home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / samba / patches / samba-1.041 / samba-1
Text File  |  1995-11-24  |  133KB  |  4,249 lines

  1. diff -u -r --new-file last-version/docs/DIAGNOSIS.txt samba-1.9.15p4/docs/DIAGNOSIS.txt
  2. --- last-version/docs/DIAGNOSIS.txt    Tue Nov 14 22:41:04 1995
  3. +++ samba-1.9.15p4/docs/DIAGNOSIS.txt    Wed Nov 22 22:22:19 1995
  4. @@ -11,7 +11,7 @@
  5.  the earlier tests.
  6.  
  7.  I would welcome additions to this set of tests. Please mail them to
  8. -Andrew.Tridgell@anu.edu.au
  9. +samba-bugs@anu.edu.au
  10.  
  11.  If you send me an email saying "it doesn't work" and you have not
  12.  followed this test procedure then you should not be surprised if I
  13. diff -u -r --new-file last-version/docs/MIRRORS samba-1.9.15p4/docs/MIRRORS
  14. --- last-version/docs/MIRRORS    Mon Nov 13 08:31:20 1995
  15. +++ samba-1.9.15p4/docs/MIRRORS    Wed Nov 22 22:22:58 1995
  16. @@ -1,5 +1,5 @@
  17. -The main Samba site is nimbus.anu.edu.au in pub/tridge/samba/. This is 
  18. -maintained by Andrew.Tridgell@anu.edu.au
  19. +The main Samba site is nimbus.anu.edu.au in pub/tridge/samba/. Contact
  20. +samba-bugs@anu.edu.au for help with this site.
  21.  
  22.  Mirror sites include:
  23.  
  24. diff -u -r --new-file last-version/docs/PROJECTS samba-1.9.15p4/docs/PROJECTS
  25. --- last-version/docs/PROJECTS    Sat May 27 16:03:39 1995
  26. +++ samba-1.9.15p4/docs/PROJECTS    Wed Nov 22 22:23:40 1995
  27. @@ -2,6 +2,9 @@
  28.                   ========================
  29.  
  30.  
  31. +>>>>> NOTE: THIS FILE IS NOW VERY OUT OF DATE <<<<<
  32. +
  33. +
  34.  This is a list of who's working on what in Samba. It's not guaranteed
  35.  to be uptodate or accurate but I hope it will help us getting
  36.  coordinated.
  37. @@ -10,9 +13,8 @@
  38.  then please let me know! Also, if you are listed below and you have
  39.  any corrections or updates then please let me know.
  40.  
  41. -Andrew Tridgell
  42. -Andrew.Tridgell@anu.edu.au
  43. -
  44. +Email contact:
  45. +samba-bugs@anu.edu.au
  46.  
  47.  ========================================================================
  48.  Documentation and FAQ
  49. diff -u -r --new-file last-version/docs/README.jis samba-1.9.15p4/docs/README.jis
  50. --- last-version/docs/README.jis    Thu Sep 21 20:47:16 1995
  51. +++ samba-1.9.15p4/docs/README.jis    Fri Nov 24 14:55:12 1995
  52. @@ -34,6 +34,12 @@
  53.            $B$N(B16$B?J?t$rB3$1$k7A<0$K$J$j$^$9!#(B
  54.        $B$3$3$G!"(B':' $B$rB>$NJ8;z$KJQ99$7$?$$>l9g$O!"(Bhex $B$N8e$m$K$=$NJ8;z$r;XDj$7$^$9!#(B
  55.            $BNc$($P!"(B@$B$rJQ$o$j$K;H$$$?$$>l9g$O!"(B'hex@'$B$N$h$&$K;XDj$7$^$9!#(B
  56. +    cap:  7 bits $B$N(B ASCII $B%3!<%I0J30$N%3!<%I$r0J2<$N7A<0$GI=$9J}<0$H$$$&E@$G$O(B
  57. +          hex$B$HF1MM$G$9$,!"(BCAP (The Columbia AppleTalk Package)$B$H8_49@-$r;}$DJQ49(B
  58. +          $BJ}<0$H$J$C$F$$$^$9!#(Bhex$B$H$N0c$$$O(B0x80$B0J>e$N%3!<%I$N$_(B':80'$B$N$h$&$KJQ49(B
  59. +          $B$5$l!"$=$NB>$O(BASCII$B%3!<%I$G8=$5$l$^$9!#(B
  60. +          $BNc$($P!"(B'$B%*%U%#%9(B'$B$H$$$&L>A0$O!"(B':83I:83t:83B:83X'$B$H$J$j$^$9!#(B
  61. +
  62.      JIS $B%3!<%I$K$D$$$F$O!"0J2<$NI=$r;2>H$7$F2<$5$$!#(B
  63.      $B(#(!(!(!(((!(!(!(!(((!(!(!(!(((!(!(!(!(((!(!(!(!(((!(!(!(!(((!(!(!(!(!(!(!(!(!($(B
  64.      $B(";XDj(B  $B("4A;z3+;O("4A;z=*N;("%+%J3+;O("%+%J=*N;("1Q?t3+;O("Hw9M(B              $B("(B
  65. @@ -112,13 +118,13 @@
  66.  
  67.  5. $B$=$NB>(B
  68.  
  69. -  hex $B7A<0$NJQ49J}K!$O!"(B
  70. -
  71. -    $BBgLZ!wBgDM!&C^GH(B <ohki@gssm.otsuka.tsukuba.ac.jp>$B;a(B
  72. +  $B%3!<%IJQ49$O0J2<$NJ}!9$,:n$i$l$?%W%m%0%i%`$rMxMQ$7$F$$$^$9!#(B
  73.  
  74. -  $B$,:n$i$l$?%3!<%I$rMxMQ$7$F$$$^$9!#(B
  75. +  hex $B7A<0(B       $BBgLZ!wBgDM!&C^GH(B <ohki@gssm.otsuka.tsukuba.ac.jp>$B;a(B
  76. +  cap $B7A<0(B       $BI%ED(B $BF;O:(B (michiro@po.iijnet.or.jp)(michiro@dms.toppan.co.jp)$B;a(B
  77.  
  78.  1994$BG/(B10$B7n(B28$BF|(B $BBh#1HG(B
  79.  1995$BG/(B 8$B7n(B16$BF|(B $BBh#2HG(B
  80. +1995$BG/(B11$B7n(B24$BF|(B $BBh#3HG(B
  81.  $BF#ED(B $B?r(B  fujita@ainix.isac.co.jp
  82.  
  83. Only in last-version/docs: SMBGuide.txt
  84. diff -u -r --new-file last-version/docs/Speed.txt samba-1.9.15p4/docs/Speed.txt
  85. --- last-version/docs/Speed.txt    Sun Oct 22 12:21:48 1995
  86. +++ samba-1.9.15p4/docs/Speed.txt    Wed Nov 22 22:24:44 1995
  87. @@ -269,4 +269,4 @@
  88.  If you've read this far then please give me some feedback! Which of
  89.  the above suggestions worked for you?
  90.  
  91. -Mail the samba mailing list or Andrew.Tridgell@anu.edu.au
  92. +Mail the samba mailing list or samba-bugs@anu.edu.au
  93. diff -u -r --new-file last-version/docs/Support.txt samba-1.9.15p4/docs/Support.txt
  94. --- last-version/docs/Support.txt    Mon Oct 30 17:30:07 1995
  95. +++ samba-1.9.15p4/docs/Support.txt    Wed Nov 22 22:25:08 1995
  96. @@ -13,8 +13,7 @@
  97.  order that I have received them. If it gets too big I may organise it
  98.  by region.
  99.  
  100. -Andrew.Tridgell@anu.edu.au
  101. -
  102. +You can contact the maintainer at samba-bugs@anu.edu.au
  103.  
  104.  
  105.  ------------------------------------------------------------------------------
  106. diff -u -r --new-file last-version/docs/addtosmbpass.1 samba-1.9.15p4/docs/addtosmbpass.1
  107. --- last-version/docs/addtosmbpass.1    Thu Jan  1 10:00:00 1970
  108. +++ samba-1.9.15p4/docs/addtosmbpass.1    Fri Nov 24 00:38:09 1995
  109. @@ -0,0 +1,59 @@
  110. +.TH addtosmbpass 1 "16 November 1995"
  111. +.SH NAME
  112. +addtosmbpass \- add entry for an existing account to a Samba password
  113. +file.
  114. +.SH SYNOPSIS
  115. +.B addtosmbpass
  116. +.I name
  117. +[
  118. +.I "name \&..."
  119. +]
  120. +.SH DESCRIPTION
  121. +.I addtosmbpass
  122. +is a utility for adding entries, in a proper format,
  123. +to a file used by Samba when validating passwords for clients (most
  124. +likely
  125. +.I "/usr/local/samba/lib/smbpasswd"
  126. +but this default can be changed in a compile time).  An old (possibly
  127. +empty as in
  128. +.I /dev/null
  129. +) Samba password file is expected on stdin and a new file, with
  130. +skeleton entries for arguments added, is printed on stdout.  A file
  131. +.I "/etc/passwd"
  132. +is scanned for a required information.
  133. +If an entry for a
  134. +.I name
  135. +is not present then account data are searched in NIS data bases -
  136. +if possible.  If an entry for
  137. +.I name
  138. +already exists in stdin input or it account information cannot be
  139. +found then this request is quietly skipped.
  140. +.SH FILES
  141. +.I "/usr/local/samba/lib/smbpasswd, /etc/passwd"
  142. +.SH "SEE ALSO"
  143. +smbpasswd(1), passwd(5), ypmatch(1)
  144. +.SH BUGS
  145. +.I addtosmbpass,
  146. +like other Samba password file utilities, is written
  147. +in
  148. +.I awk.
  149. +Although an attempt was made to accommodate various broken
  150. +variants of
  151. +.I awk
  152. +which may be around there is no guarantee that what you have 
  153. +is even worse.
  154. +.PP
  155. +It is assumed that if
  156. +.I ypmatch
  157. +program exists then NIS was set and the program will work.  This
  158. +may not be true.  In such case just comment out a line which sets
  159. +.B ypmatch
  160. +variable
  161. +in BEGIN block.
  162. +.PP
  163. +A location of awk interpreter at the top of the program may need
  164. +an adjustment.  Also a user may edit a program modifying it beyong
  165. +recognition.  This last property may be construed as a feature.
  166. +.SH AUTHOR
  167. +Michal Jaegermann (michal@ellpspace.math.ualberta.ca)
  168. +
  169. diff -u -r --new-file last-version/docs/announce samba-1.9.15p4/docs/announce
  170. --- last-version/docs/announce    Wed Apr 26 18:38:24 1995
  171. +++ samba-1.9.15p4/docs/announce    Wed Nov 22 22:26:07 1995
  172. @@ -125,5 +125,5 @@
  173.  A WWW site with lots of Samba info can be found at 
  174.  http://lake.canberra.edu.au/pub/samba/
  175.  
  176. -Andrew Tridgell (Andrew.Tridgell@anu.edu.au)
  177. +Andrew Tridgell (Contact: samba-bugs@anu.edu.au)
  178.  January 1995
  179. diff -u -r --new-file last-version/docs/nmbd.8 samba-1.9.15p4/docs/nmbd.8
  180. --- last-version/docs/nmbd.8    Tue Nov 14 22:33:04 1995
  181. +++ samba-1.9.15p4/docs/nmbd.8    Wed Nov 22 22:26:53 1995
  182. @@ -473,7 +473,7 @@
  183.  None known.
  184.  .SH CREDITS
  185.  The original Samba software and related utilities were created by 
  186. -Andrew Tridgell (Andrew.Tridgell@anu.edu.au). Andrew is also the Keeper
  187. +Andrew Tridgell (samba-bugs@anu.edu.au). Andrew is also the Keeper
  188.  of the Source for this project.
  189.  
  190.  This man page written by Karl Auer (Karl.Auer@anu.edu.au)
  191. diff -u -r --new-file last-version/docs/samba.7 samba-1.9.15p4/docs/samba.7
  192. --- last-version/docs/samba.7    Wed Mar 29 19:42:58 1995
  193. +++ samba-1.9.15p4/docs/samba.7    Wed Nov 22 22:27:07 1995
  194. @@ -59,7 +59,7 @@
  195.  .SH AUTHOR
  196.  
  197.  The main author of the Samba suite is Andrew Tridgell. He may be
  198. -contacted via e-mail at Andrew.Tridgell@anu.edu.au.
  199. +contacted via e-mail at samba-bugs@anu.edu.au.
  200.  
  201.  There have also been an enourmous number of contributors to Samba from
  202.  all over the world. A partial list of these contributors is included
  203. @@ -73,7 +73,7 @@
  204.  join the Samba mailing list.
  205.  
  206.  If you have patches to submit or bugs to report then you may mail them
  207. -directly to Andrew.Tridgell@anu.edu.au. Note, however, that due to the
  208. +directly to samba-bugs@anu.edu.au. Note, however, that due to the
  209.  enourmous popularity of this package I may take some time to repond to
  210.  mail. I prefer patches in "diff -u" format.
  211.  
  212. @@ -176,7 +176,7 @@
  213.   S{rkel{, Vesa
  214.       (vesku@rankki.kcl.fi)
  215.   Tridgell, Andrew
  216. -     (Andrew.Tridgell@anu.edu.au)
  217. +     (samba-bugs@anu.edu.au)
  218.   Troyer, Dean
  219.       (troyer@saifr00.ateng.az.honeywell.com)
  220.   Wakelin, Ross
  221. diff -u -r --new-file last-version/docs/samba.lsm samba-1.9.15p4/docs/samba.lsm
  222. --- last-version/docs/samba.lsm    Tue Oct 11 17:28:40 1994
  223. +++ samba-1.9.15p4/docs/samba.lsm    Wed Nov 22 22:27:34 1995
  224. @@ -7,9 +7,9 @@
  225.  Desc4        = and Pathworks. It also includes a ftp-style unix client
  226.  Desc5        = and a netbios nameserver.
  227.  Author       = Andrew Tridgell
  228. -AuthorEmail  = Andrew.Tridgell@anu.edu.au
  229. +AuthorEmail  = samba-bugs@anu.edu.au
  230.  Maintainer   = Andrew Tridgell
  231. -MaintEmail   = Andrew.Tridgell@anu.edu.au
  232. +MaintEmail   = samba-bugs@anu.edu.au
  233.  Site1        = nimbus.anu.edu.au
  234.  Path1        = pub/tridge/samba/
  235.  File1        = samba-latest.tar.gz
  236. diff -u -r --new-file last-version/docs/smb.conf.5 samba-1.9.15p4/docs/smb.conf.5
  237. --- last-version/docs/smb.conf.5    Wed Nov 22 10:30:40 1995
  238. +++ samba-1.9.15p4/docs/smb.conf.5    Thu Nov 23 11:03:28 1995
  239. @@ -414,6 +414,10 @@
  240.  
  241.  strip dot
  242.  
  243. +syslog
  244. +
  245. +syslog only
  246. +
  247.  time offset
  248.  
  249.  username map
  250. @@ -505,6 +509,8 @@
  251.  
  252.  max connections
  253.  
  254. +max disk size
  255. +
  256.  min print space
  257.  
  258.  only guest
  259. @@ -1324,6 +1330,20 @@
  260.  .B Example:
  261.       mangling char = ^
  262.  
  263. +.SS max disk size (G)
  264. +
  265. +This option helps with large disks and applications that can't handle
  266. +them. You use it to pretend to the client that the disk is smaller,
  267. +but the client will still be able to use all available disk space.
  268. +
  269. +You specify the size in MB. A size of less than 1024 will fix problems
  270. +with fussy programs.
  271. +
  272. +By default the "max disk size" is 0, which means no maximum.
  273. +
  274. +.B Example:
  275. +    max disk size = 1024
  276. +
  277.  .SS max log file (G)
  278.  
  279.  This option (an integer in kilobytes) specifies the max size the log
  280. @@ -2163,7 +2183,7 @@
  281.  option" when you supply an option. This means you either mis-typed it
  282.  or you need to add an include file to includes.h for your OS. If the
  283.  latter is the case please send the patch to me
  284. -(Andrew.Tridgell@anu.edu.au).
  285. +(samba-bugs@anu.edu.au).
  286.  
  287.  Any of the supported socket options may be combined in any way you
  288.  like, as long as your OS allows it.
  289. @@ -2278,6 +2298,43 @@
  290.  .B Example:
  291.      sync always = yes
  292.  
  293. +.SS syslog (G)
  294. +
  295. +This integer parameter is used in conjunction with
  296. +.B debug level
  297. +to filter out debugging messages destined for the system logger.
  298. +Only those debugging messages that are
  299. +.I less than or equal to
  300. +.B debug level
  301. +and
  302. +.I less than
  303. +.B syslog
  304. +are sent to the system logger.  Thus, a value of 0 can be used
  305. +to turn off system logging.
  306. +
  307. +You must compile with -DSYSLOG in order for system logging to
  308. +be enabled.
  309. +
  310. +.B Default:
  311. +    syslog = 1
  312. +
  313. +.B Example:
  314. +    syslog = 0
  315. +
  316. +.SS syslog only (G)
  317. +
  318. +This boolean controls whether debugging messages are sent to the
  319. +log file and system logger, or only to the system logger.
  320. +
  321. +You must compile with -DSYSLOG in order for system logging to
  322. +be enabled.
  323. +
  324. +.B Default:
  325. +    syslog only = False
  326. +
  327. +.B Example:
  328. +    syslog only = True
  329. +
  330.  .SS time offset (G)
  331.  This parameter is a setting in minutes to add to the normal GMT to
  332.  local time conversion. This is useful if you are serving a lot of PCs
  333. @@ -2632,7 +2689,7 @@
  334.  Please send bug reports, comments and so on to:
  335.  
  336.  .RS 3
  337. -.B Andrew.Tridgell@anu.edu.au (Andrew Tridgell)
  338. +.B samba-bugs@anu.edu.au (Andrew Tridgell)
  339.  
  340.  .RS 3
  341.  or to the mailing list
  342. @@ -2655,6 +2712,6 @@
  343.  mailed to:
  344.  
  345.  .RS 3
  346. -.B Andrew.Tridgell@anu.edu.au (Andrew Tridgell)
  347. +.B samba-bugs@anu.edu.au (Andrew Tridgell)
  348.  .RE
  349.  
  350. diff -u -r --new-file last-version/docs/smb.conf.5.orig samba-1.9.15p4/docs/smb.conf.5.orig
  351. --- last-version/docs/smb.conf.5.orig    Thu Jan  1 10:00:00 1970
  352. +++ samba-1.9.15p4/docs/smb.conf.5.orig    Wed Nov 22 22:47:24 1995
  353. @@ -0,0 +1,2676 @@
  354. +.TH SMB.CONF 5 11/10/94 smb.conf smb.conf
  355. +.SH NAME
  356. +smb.conf \- configuration file for smbd
  357. +.SH SYNOPSIS
  358. +.B smb.conf
  359. +.SH DESCRIPTION
  360. +The
  361. +.B smb.conf
  362. +file is a configuration file for the Samba suite.
  363. +
  364. +.B smb.conf
  365. +contains runtime configuration information for the
  366. +.B smbd
  367. +program. The
  368. +.B smbd
  369. +program provides LanManager-like services to clients
  370. +using the SMB protocol.
  371. +
  372. +.SH FILE FORMAT
  373. +The file consists of sections and parameters. A section begins with the 
  374. +name of the section in square brackets and continues until the next
  375. +section begins. Sections contain parameters of the form 'name = value'.
  376. +
  377. +The file is line-based - that is, each newline-terminated line represents
  378. +either a comment, a section name or a parameter.
  379. +
  380. +Section and parameter names are not case sensitive.
  381. +
  382. +Only the first equals sign in a parameter is significant. Whitespace before 
  383. +or after the first equals sign is discarded. Leading, trailing and internal
  384. +whitespace in section and parameter names is irrelevant. Leading and
  385. +trailing whitespace in a parameter value is discarded. Internal whitespace
  386. +within a parameter value is retained verbatim.
  387. +
  388. +Any line beginning with a semicolon is ignored, as are lines containing 
  389. +only whitespace.
  390. +
  391. +Any line ending in a \ is "continued" on the next line in the
  392. +customary unix fashion.
  393. +
  394. +The values following the equals sign in parameters are all either a string
  395. +(no quotes needed) or a boolean, which may be given as yes/no, 0/1 or
  396. +true/false. Case is not significant in boolean values, but is preserved
  397. +in string values. Some items such as create modes are numeric.
  398. +.SH SERVICE DESCRIPTIONS
  399. +Each section in the configuration file describes a service. The section name
  400. +is the service name and the parameters within the section define the service's
  401. +attributes.
  402. +
  403. +There are three special sections, [global], [homes] and [printers], which are
  404. +described under 'special sections'. The following notes apply to ordinary 
  405. +service descriptions.
  406. +
  407. +A service consists of a directory to which access is being given plus a 
  408. +description of the access rights which are granted to the user of the 
  409. +service. Some housekeeping options are also specifiable.
  410. +
  411. +Services are either filespace services (used by the client as an extension of
  412. +their native file systems) or printable services (used by the client to access
  413. +print services on the host running the server).
  414. +
  415. +Services may be guest services, in which case no password is required to
  416. +access them. A specified guest account is used to define access privileges
  417. +in this case.
  418. +
  419. +Services other than guest services will require a password to access
  420. +them. The client provides the username. As many clients only provide
  421. +passwords and not usernames, you may specify a list of usernames to
  422. +check against the password using the "user=" option in the service
  423. +definition. 
  424. +
  425. +Note that the access rights granted by the server are masked by the access
  426. +rights granted to the specified or guest user by the host system. The 
  427. +server does not grant more access than the host system grants.
  428. +
  429. +The following sample section defines a file space service. The user has write
  430. +access to the path /home/bar. The service is accessed via the service name 
  431. +"foo":
  432. +
  433. +     [foo]
  434. +         path = /home/bar
  435. +         writable = true
  436. +
  437. +The following sample section defines a printable service. The service is 
  438. +readonly, but printable. That is, the only write access permitted is via 
  439. +calls to open, write to and close a spool file. The 'guest ok' parameter 
  440. +means access will be permitted as the default guest user (specified elsewhere):
  441. +
  442. +     [aprinter]
  443. +         path = /usr/spool/public
  444. +         read only = true
  445. +         printable = true
  446. +         public = true
  447. +
  448. +.SH SPECIAL SECTIONS
  449. +
  450. +.SS The [global] section
  451. +.RS 3
  452. +Parameters in this section apply to the server as a whole, or are defaults
  453. +for services which do not specifically define certain items. See the notes
  454. +under 'Parameters' for more information.
  455. +.RE
  456. +
  457. +.SS The [homes] section
  458. +.RS 3
  459. +If a section called 'homes' is included in the configuration file, services
  460. +connecting clients to their home directories can be created on the fly by the
  461. +server.
  462. +
  463. +When the connection request is made, the existing services are scanned. If a
  464. +match is found, it is used. If no match is found, the requested service name is
  465. +treated as a user name and looked up in the local passwords file. If the
  466. +name exists and the correct password has been given, a service is created
  467. +by cloning the [homes] section.
  468. +
  469. +Some modifications are then made to the newly created section:
  470. +
  471. +.RS 3
  472. +The service name is changed from 'homes' to the located username
  473. +
  474. +If no path was given, the path is set to the user's home directory.
  475. +.RE
  476. +
  477. +If you decide to use a path= line in your [homes] section then you may
  478. +find it useful to use the %S macro. For example path=/data/pchome/%S
  479. +would be useful if you have different home directories for your PCs
  480. +than for unix access.
  481. +
  482. +This is a fast and simple way to give a large number of clients access to
  483. +their home directories with a minimum of fuss.
  484. +
  485. +A similar process occurs if the requested service name is "homes", except that
  486. +the service name is not changed to that of the requesting user. This method
  487. +of using the [homes] section works well if different users share a client PC.
  488. +
  489. +The [homes] section can specify all the parameters a normal service section
  490. +can specify, though some make more sense than others. The following is a 
  491. +typical and suitable [homes] section:
  492. +
  493. +     [homes]
  494. +         writable = yes
  495. +
  496. +An important point:
  497. +
  498. +.RS 3
  499. +If guest access is specified in the [homes] section, all home directories will
  500. +be accessible to all clients
  501. +.B without a password.
  502. +In the very unlikely event
  503. +that this is actually desirable, it would be wise to also specify read only
  504. +access.
  505. +.RE
  506. +.RE
  507. +
  508. +Note that the browseable flag for auto home directories will be
  509. +inherited from the global browseable flag, not the [homes] browseable
  510. +flag. This is useful as it means setting browseable=no in the [homes]
  511. +section will hide the [homes] service but make any auto home
  512. +directories visible.
  513. +
  514. +.SS The [printers] section
  515. +.RS 3
  516. +This section works like [homes], but for printers.
  517. +
  518. +If a [printers] section occurs in the configuration file, users are able 
  519. +to connect to any printer specified in the local host's printcap file.
  520. +
  521. +When a connection request is made, the existing services are scanned. If a
  522. +match is found, it is used. If no match is found, but a [homes] section
  523. +exists, it is used as described above. Otherwise, the requested service name is
  524. +treated as a printer name and the appropriate printcap file is scanned to
  525. +see if the requested service name is a valid printer name. If a match is
  526. +found, a new service is created by cloning the [printers] section.
  527. +
  528. +A few modifications are then made to the newly created section:
  529. +
  530. +.RS 3
  531. +The service name is set to the located printer name
  532. +
  533. +If no printer name was given, the printer name is set to the located printer
  534. +name
  535. +
  536. +If the service does not permit guest access and no username was given, the 
  537. +username is set to the located printer name.
  538. +.RE
  539. +
  540. +Note that the [printers] service MUST be printable - if you specify otherwise,
  541. +the server will refuse to load the configuration file.
  542. +
  543. +Typically the path specified would be that of a world-writable spool directory
  544. +with the sticky bit set on it. A typical [printers] entry would look like this:
  545. +
  546. +     [printers]
  547. +         path = /usr/spool/public
  548. +         writable = no
  549. +         public = yes
  550. +         printable = yes 
  551. +
  552. +All aliases given for a printer in the printcap file are legitimate printer
  553. +names as far as the server is concerned. If your printing subsystem doesn't
  554. +work like that, you will have to set up a pseudo-printcap. This is a file
  555. +consisting of one or more lines like this:
  556. +
  557. +        alias|alias|alias|alias...
  558. +
  559. +Each alias should be an acceptable printer name for your printing 
  560. +subsystem. In the [global] section, specify the new file as your printcap.
  561. +The server will then only recognise names found in your pseudo-printcap,
  562. +which of course can contain whatever aliases you like. The same technique
  563. +could be used simply to limit access to a subset of your local printers.
  564. +
  565. +An alias, by the way, is defined as any component of the first entry of a 
  566. +printcap record. Records are separated by newlines, components (if there are 
  567. +more than one) are separated by vertical bar symbols ("|").
  568. +.SH PARAMETERS
  569. +Parameters define the specific attributes of services.
  570. +
  571. +Some parameters are specific to the [global] section (eg., security).
  572. +Some parameters are usable in all sections (eg., create mode). All others are
  573. +permissible only in normal sections. For the purposes of the following
  574. +descriptions the [homes] and [printers] sections will be considered normal.
  575. +The letter 'G' in parentheses indicates that a parameter is specific to the
  576. +[global] section. The letter 'S' indicates that a parameter can be
  577. +specified in a secvice specific section. Note that all S parameters
  578. +can also be specified in the [global] section - in which case they
  579. +will define the default behaviour for all services.
  580. +
  581. +Parameters are arranged here in alphabetical order - this may not create
  582. +best bedfellows, but at least you can find them! Where there are synonyms,
  583. +the preferred synonym is described, others refer to the preferred synonym.
  584. +
  585. +.SS VARIABLE SUBSTITUTIONS
  586. +
  587. +Many of the strings that are settable in the config file can take
  588. +substitutions. For example the option "path = /tmp/%u" would be
  589. +interpreted as "path = /tmp/john" if the user connected with the
  590. +username john.
  591. +
  592. +These substitutions are mostly noted in the descriptions below, but
  593. +there are some general substitions which apply whenever they might be
  594. +relevant. These are:
  595. +
  596. +%S = the name of the current service, if any
  597. +
  598. +%P = the root directory of the current service, if any
  599. +
  600. +%u = user name of the current service, if any
  601. +
  602. +%U = session user name (the user name that the client wanted, not
  603. +necessarily the same as the one they got)
  604. +
  605. +%H = the home directory of the user given by %u
  606. +
  607. +%v = the Samba version
  608. +
  609. +%h = the hostname that Samba is running on
  610. +
  611. +%m = the netbios name of the client machine (very useful)
  612. +
  613. +%L = the netbios name of the server. This allows you to change your
  614. +config based on what the client calls you. Your server can have a "dual
  615. +personality".
  616. +
  617. +%M = the internet name of the client machine
  618. +
  619. +%d = The process id of the current server process
  620. +
  621. +%a = the architecture of the remote machine. Only some are recognised,
  622. +and those may not be 100% reliable. It currently recognises Samba,
  623. +WfWg, WinNT and Win95. Anything else will be known as "UNKNOWN". If it
  624. +gets it wrong then sending me a level 3 log should allow me to fix it.
  625. +
  626. +%I = The IP address of the client machine
  627. +
  628. +%T = the current date and time
  629. +
  630. +There are some quite creative things that can be done with these
  631. +substitutions and other smb.conf options.
  632. +
  633. +.SS NAME MANGLING
  634. +
  635. +Samba supports "name mangling" so that Dos and Windows clients can use
  636. +files that don't conform to the 8.3 format. It can also be set to adjust
  637. +the case of 8.3 format filenames.
  638. +
  639. +There are several options that control the way mangling is performed,
  640. +and they are grouped here rather than listed separately. For the
  641. +defaults look at the output of the testparm program.
  642. +
  643. +All of these options can be set separately for each service (or
  644. +globally, of course).
  645. +
  646. +The options are:
  647. +
  648. +"mangle case = yes/no" controls if names that have characters that
  649. +aren't of the "default" case are mangled. For example, if this is yes
  650. +then a name like "Mail" would be mangled. Default no.
  651. +
  652. +"case sensitive = yes/no" controls whether filenames are case
  653. +sensitive. If they aren't then Samba must do a filename search and
  654. +match on passed names. Default no.
  655. +
  656. +"default case = upper/lower" controls what the default case is for new
  657. +filenames. Default lower.
  658. +
  659. +"preserve case = yes/no" controls if new files are created with the
  660. +case that the client passes, or if they are forced to be the "default"
  661. +case. Default no.
  662. +
  663. +"short preserve case = yes/no" controls if new files which conform to 8.3
  664. +syntax, that is all in upper case and of suitable length, are created
  665. +upper case, or if they are forced to be the "default" case. This option can
  666. +be use with "preserve case = yes" to permit long filenames to retain their
  667. +case, while short names are lowered. Default no.
  668. +
  669. +.SS COMPLETE LIST OF GLOBAL PARAMETER
  670. +
  671. +Here is a list of all global parameters. See the section of each
  672. +parameter for details.  Note that some are synonyms.
  673. +
  674. +auto services
  675. +
  676. +config file
  677. +
  678. +deadtime
  679. +
  680. +debuglevel
  681. +
  682. +default
  683. +
  684. +default service
  685. +
  686. +dfree command
  687. +
  688. +encrypt passwords
  689. +
  690. +getwd cache
  691. +
  692. +hosts equiv
  693. +
  694. +include
  695. +
  696. +keepalive
  697. +
  698. +lock dir
  699. +
  700. +load printers
  701. +
  702. +lock directory
  703. +
  704. +log file
  705. +
  706. +log level
  707. +
  708. +lpq cache time
  709. +
  710. +mangled stack
  711. +
  712. +max log size
  713. +
  714. +max packet
  715. +
  716. +max xmit
  717. +
  718. +message command
  719. +
  720. +null passwords
  721. +
  722. +os level
  723. +
  724. +packet size
  725. +
  726. +passwd chat
  727. +
  728. +passwd program
  729. +
  730. +password level
  731. +
  732. +password server
  733. +
  734. +preferred master
  735. +
  736. +preload
  737. +
  738. +printing
  739. +
  740. +printcap name
  741. +
  742. +protocol
  743. +
  744. +read bmpx
  745. +
  746. +read prediction
  747. +
  748. +read raw
  749. +
  750. +read size
  751. +
  752. +root
  753. +
  754. +root dir
  755. +
  756. +root directory
  757. +
  758. +security
  759. +
  760. +server string
  761. +
  762. +smbrun
  763. +
  764. +socket options
  765. +
  766. +status
  767. +
  768. +strip dot
  769. +
  770. +time offset
  771. +
  772. +username map
  773. +
  774. +use rhosts
  775. +
  776. +valid chars
  777. +
  778. +workgroup
  779. +
  780. +write raw
  781. +
  782. +.SS COMPLETE LIST OF SERVICE PARAMETER
  783. +
  784. +Here is a list of all service parameters. See the section of each
  785. +parameter for details. Note that some are synonyms.
  786. +
  787. +admin users
  788. +
  789. +allow hosts
  790. +
  791. +alternate permissions
  792. +
  793. +available
  794. +
  795. +browseable
  796. +
  797. +case sensitive
  798. +
  799. +case sig names
  800. +
  801. +copy
  802. +
  803. +create mask
  804. +
  805. +create mode
  806. +
  807. +comment
  808. +
  809. +default case
  810. +
  811. +deny hosts
  812. +
  813. +directory
  814. +
  815. +dont descend
  816. +
  817. +exec
  818. +
  819. +force group
  820. +
  821. +force user
  822. +
  823. +guest account
  824. +
  825. +guest ok
  826. +
  827. +guest only
  828. +
  829. +hide dot files
  830. +
  831. +hosts allow
  832. +
  833. +hosts deny
  834. +
  835. +invalid users
  836. +
  837. +locking
  838. +
  839. +lpq command
  840. +
  841. +lprm command
  842. +
  843. +magic output
  844. +
  845. +magic script
  846. +
  847. +mangle case
  848. +
  849. +mangled names
  850. +
  851. +mangling char
  852. +
  853. +map archive
  854. +
  855. +map hidden
  856. +
  857. +map system
  858. +
  859. +max connections
  860. +
  861. +max disk size
  862. +
  863. +min print space
  864. +
  865. +only guest
  866. +
  867. +only user
  868. +
  869. +path
  870. +
  871. +postexec
  872. +
  873. +postscript
  874. +
  875. +preserve case
  876. +
  877. +print command
  878. +
  879. +print ok
  880. +
  881. +printable
  882. +
  883. +printer
  884. +
  885. +printer name
  886. +
  887. +public
  888. +
  889. +read only
  890. +
  891. +read list
  892. +
  893. +revalidate
  894. +
  895. +root postexec
  896. +
  897. +root preexec
  898. +
  899. +set directory
  900. +
  901. +share modes
  902. +
  903. +short preserve case
  904. +
  905. +strict locking
  906. +
  907. +sync always
  908. +
  909. +user
  910. +
  911. +username
  912. +
  913. +users
  914. +
  915. +valid users
  916. +
  917. +volume
  918. +
  919. +wide links
  920. +
  921. +writable
  922. +
  923. +write ok
  924. +
  925. +writeable
  926. +
  927. +write list
  928. +
  929. +.SS EXPLANATION OF EACH PARAMETER
  930. +.RS 3
  931. +
  932. +.SS admin users (G)
  933. +
  934. +This is a list of users who will be granted administrative privilages
  935. +on the share. This means that they will do all file operations as the
  936. +super-user (root).
  937. +
  938. +You should use this option very carefully, as any user in this list
  939. +will be able to do anything they like on the share, irrespective of
  940. +file permissions.
  941. +
  942. +.B Default:
  943. +    no admin users
  944. +
  945. +.B Example:
  946. +    admin users = jason
  947. +
  948. +.SS auto services (G)
  949. +This is a list of services that you want to be automatically added to
  950. +the browse lists. This is most useful for homes and printers services
  951. +that would otherwise not be visible.
  952. +
  953. +Note that if you just want all printers in your printcap file loaded
  954. +then the "load printers" option is easier.
  955. +
  956. +.B Default:
  957. +    no auto services
  958. +
  959. +.B Example:
  960. +    auto services = fred lp colorlp
  961. +
  962. +
  963. +.SS allow hosts (S)
  964. +A synonym for this parameter is 'hosts allow'.
  965. +
  966. +This parameter is a comma delimited set of hosts which are permitted to access
  967. +a services. If specified in the [global] section, matching hosts will be
  968. +allowed access to any service that does not specifically exclude them from
  969. +access. Specific services my have their own list, which override those
  970. +specified in the [global] section.
  971. +
  972. +You can specify the hosts by name or IP number. For example, you could
  973. +restrict access to only the hosts on a Class C subnet with something like
  974. +"allow hosts = 150.203.5.". The full syntax of the list is described in
  975. +the man page
  976. +.B hosts_access(5).
  977. +
  978. +You can also specify hosts by network/netmask pairs and by netgroup
  979. +names if your system supports netgroups. The EXCEPT keyword can also
  980. +be used to limit a wildcard list. The following examples may provide
  981. +some help:
  982. +
  983. +Example 1: allow all IPs in 150.203.*.* except one
  984. +
  985. +    hosts allow = 150.203. EXCEPT 150.203.6.66
  986. +
  987. +Example 2: allow hosts that match the given network/netmask
  988. +
  989. +    hosts allow = 150.203.15.0/255.255.255.0
  990. +
  991. +Example 3: allow a couple of hosts
  992. +
  993. +    hosts allow = lapland, arvidsjaur
  994. +
  995. +Example 4: allow only hosts in netgroup "foonet" or localhost, but 
  996. +deny access from one particular host
  997. +
  998. +     hosts allow = @foonet, localhost
  999. +     hosts deny = pirate
  1000. +
  1001. +Note that access still requires suitable user-level passwords.
  1002. +
  1003. +See testparm(1) for a way of testing your host access to see if it
  1004. +does what you expect.
  1005. +
  1006. +.B Default:
  1007. +     none (ie., all hosts permitted access)
  1008. +
  1009. +.B Example:
  1010. +     allow hosts = 150.203.5. myhost.mynet.edu.au
  1011. +
  1012. +.SS alternate permissions (S)
  1013. +
  1014. +This option affects the way the "read only" DOS attribute is produced
  1015. +for unix files. If this is false then the read only bit is set for
  1016. +files on writeable shares which the user cannot write to.
  1017. +
  1018. +If this is true then it is set for files whos user write bit is not set.
  1019. +
  1020. +The latter behaviour of useful for when users copy files from each
  1021. +others directories, and use a file manager that preserves
  1022. +permissions. Without this option they may get annoyed as all copied
  1023. +files will have the "read only" bit set.
  1024. +
  1025. +.B Default:
  1026. +    alternate permissions = no
  1027. +
  1028. +.B Example:
  1029. +    alternate permissions = yes
  1030. +
  1031. +.SS available (S)
  1032. +This parameter lets you 'turn off' a service. If 'available = no', then
  1033. +ALL attempts to connect to the service will fail. Such failures are logged.
  1034. +
  1035. +.B Default:
  1036. +     available = yes
  1037. +
  1038. +.B Example:
  1039. +     available = no
  1040. +.SS browseable (S)
  1041. +This controls whether this share is seen in the list of available
  1042. +shares in a net view and in the browse list.
  1043. +
  1044. +.B Default:
  1045. +    browseable = Yes
  1046. +
  1047. +.B Example: 
  1048. +    browseable = No
  1049. +
  1050. +.SS case sig names (G)
  1051. +See "case sensitive"
  1052. +
  1053. +.SS comment (S)
  1054. +This is a text field that is seen when a client does a net view to
  1055. +list what shares are available. It will also be used when browsing is
  1056. +fully supported.
  1057. +
  1058. +.B Default:
  1059. +    No comment string
  1060. +
  1061. +.B Example:
  1062. +    comment = Fred's Files
  1063. +
  1064. +.SS config file (G)
  1065. +
  1066. +This allows you to override the config file to use, instead of the
  1067. +default (usually smb.conf). There is a chicken and egg problem here as
  1068. +this option is set in the config file! 
  1069. +
  1070. +For this reason, if the name of the config file has changed when the
  1071. +parameters are loaded then it will reload them from the new config
  1072. +file.
  1073. +
  1074. +This option takes the usual substitutions, which can be very useful.
  1075. +
  1076. +If thew config file doesn't exist then it won't be loaded (allowing
  1077. +you to special case the config files of just a few clients).
  1078. +
  1079. +.B Example:
  1080. +    config file = /usr/local/samba/smb.conf.%m
  1081. +
  1082. +.SS copy (S)
  1083. +This parameter allows you to 'clone' service entries. The specified
  1084. +service is simply duplicated under the current service's name. Any 
  1085. +parameters specified in the current section will override those in the
  1086. +section being copied.
  1087. +
  1088. +This feature lets you set up a 'template' service and create similar 
  1089. +services easily. Note that the service being copied must occur earlier 
  1090. +in the configuration file than the service doing the copying.
  1091. +
  1092. +.B Default:
  1093. +     none
  1094. +
  1095. +.B Example:
  1096. +     copy = otherservice
  1097. +.SS create mask (S)
  1098. +A synonym for this parameter is 'create mode'.
  1099. +
  1100. +This parameter is the octal modes which are used when converting DOS modes 
  1101. +to Unix modes.
  1102. +
  1103. +Note that Samba will or this value with 0700 as you must have at least
  1104. +user read, write and execute for Samba to work properly.
  1105. +
  1106. +.B Default:
  1107. +     create mask = 0755
  1108. +
  1109. +.B Example:
  1110. +     create mask = 0775
  1111. +.SS create mode (S)
  1112. +See
  1113. +.B create mask.
  1114. +.SS dead time (G)
  1115. +The value of the parameter (a decimal integer) represents the number of
  1116. +minutes of inactivity before a connection is considered dead, and it
  1117. +is disconnected. The deadtime only takes effect if the number of open files
  1118. +is zero.
  1119. +
  1120. +This is useful to stop a server's resources being exhausted by a large
  1121. +number of inactive connections.
  1122. +
  1123. +Most clients have an auto-reconnect feature when a connection is broken so
  1124. +in most cases this parameter should be transparent to users.
  1125. +
  1126. +Using this parameter with a timeout of a few minutes is recommended
  1127. +for most systems.
  1128. +
  1129. +A deadtime of zero indicates that no auto-disconnection should be performed.
  1130. +
  1131. +.B Default:
  1132. +     dead time = 0
  1133. +
  1134. +.B Example:
  1135. +     dead time = 15
  1136. +.SS debug level (G)
  1137. +The value of the parameter (an integer) allows the debug level
  1138. +(logging level) to be specified in the smb.conf file. This is to give
  1139. +greater flexibility in the configuration of the system.
  1140. +
  1141. +The default will be the debug level specified on the command line.
  1142. +
  1143. +.B Example:
  1144. +     debug level = 3
  1145. +.SS default (G)
  1146. +See
  1147. +.B default service.
  1148. +.SS default case (S)
  1149. +
  1150. +See the section on "NAME MANGLING" Also note the addition of "short
  1151. +preserve case"
  1152. +
  1153. +.SS default service (G)
  1154. +A synonym for this parameter is 'default'.
  1155. +
  1156. +This parameter specifies the name of a service which will be connected to
  1157. +if the service actually requested cannot be found. Note that the square
  1158. +brackets are NOT given in the parameter value (see example below).
  1159. +
  1160. +There is no default value for this parameter. If this parameter is not given,
  1161. +attempting to connect to a nonexistent service results in an error.
  1162. +
  1163. +Typically the default service would be a public, read-only service.
  1164. +
  1165. +Also not that s of 1.9.14 the apparent service name will be changed to
  1166. +equal that of the requested service, this is very useful as it allows
  1167. +you to use macros like %S to make a wildcard service.
  1168. +
  1169. +Note also that any _ characters in the name of the service used in the
  1170. +default service will get mapped to a /. This allows for interesting
  1171. +things.
  1172. +
  1173. +
  1174. +.B Example:
  1175. +     default service = pub
  1176. +        
  1177. +        [pub]
  1178. +             path = /%S
  1179. +          
  1180. +
  1181. +.SS deny hosts (S)
  1182. +A synonym for this parameter is 'hosts deny'.
  1183. +
  1184. +The opposite of 'allow hosts' - hosts listed here are NOT permitted
  1185. +access to services unless the specific services have their own lists to
  1186. +override this one. Where the lists conflict, the 'allow' list takes precedence.
  1187. +
  1188. +.B Default:
  1189. +     none (ie., no hosts specifically excluded)
  1190. +
  1191. +.B Example:
  1192. +      deny hosts = 150.203.4. badhost.mynet.edu.au
  1193. +.SS dfree command (G)
  1194. +The dfree command setting should only be used on systems where a
  1195. +problem occurs with the internal disk space calculations. This has
  1196. +been known to happen with Ultrix, but may occur with other operating
  1197. +systems. The symptom that was seen was an error of "Abort Retry
  1198. +Ignore" at the end of each directory listing.
  1199. +
  1200. +This setting allows the replacement of the internal routines to
  1201. +calculate the total disk space and amount available with an external
  1202. +routine. The example below gives a possible script that might fulfill
  1203. +this function. 
  1204. +
  1205. +The external program will be passed a single parameter indicating a
  1206. +directory in the filesystem being queried. This will typically consist
  1207. +of the string "./". The script should return two integers in ascii. The
  1208. +first should be the total disk space in blocks, and the second should
  1209. +be the number of available blocks. An optional third return value
  1210. +can give the block size in bytes. The default blocksize is 1024 bytes.
  1211. +
  1212. +Note: Your script should NOT be setuid or setgid and should be owned by
  1213. +(and writable only by) root!
  1214. +
  1215. +.B Default:
  1216. +     By default internal routines for determining the disk capacity
  1217. +and remaining space will be used.
  1218. +
  1219. +.B Example:
  1220. +     dfree command = /usr/local/smb/dfree
  1221. +
  1222. +    Where the script dfree (which must be made executable) could be
  1223. +
  1224. +     #!/bin/sh
  1225. +     df $1 | tail -1 | awk '{print $2" "$4}'
  1226. +
  1227. +    or perhaps (on Sys V)
  1228. +
  1229. +    #!/bin/sh
  1230. +    /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
  1231. +
  1232. +
  1233. +    Note that you may have to replace the command names with full
  1234. +path names on some systems.
  1235. +.SS directory (S)
  1236. +See
  1237. +.B path.
  1238. +.SS dont descend (S)
  1239. +There are certain directories on some systems (eg., the /proc tree under
  1240. +Linux) that are either not of interest to clients or are infinitely deep
  1241. +(recursive). This parameter allows you to specify a comma-delimited list
  1242. +of directories that the server should always show as empty.
  1243. +
  1244. +Note that Samba can be very fussy about the exact format of the "dont
  1245. +descend" entries. For example you ma need "./proc" instead of just
  1246. +"/proc". Experimentation is the best policy :-)
  1247. +
  1248. +.B Default:
  1249. +     none (ie., all directories are OK to descend)
  1250. +
  1251. +.B Example:
  1252. +      dont descend = /proc,/dev
  1253. +
  1254. +.SS encrypt passwords (G)
  1255. +
  1256. +This boolean controls whether encrypted passwords will be negotiated
  1257. +with the cient. Note that this option has no effect if you haven't
  1258. +compiled in the necessary des libraries and encryption code. It
  1259. +defaults to no.
  1260. +
  1261. +.SS exec (S)
  1262. +
  1263. +This is an alias for preexec
  1264. +
  1265. +
  1266. +.SS force group (S)
  1267. +This specifies a group name that all connections to this service
  1268. +should be made as. This may be useful for sharing files.
  1269. +
  1270. +.B Default:
  1271. +       no forced group
  1272. +
  1273. +.B Example:
  1274. +       force group = agroup
  1275. +
  1276. +.SS force user (S)
  1277. +This specifies a user name that all connections to this service
  1278. +should be made as. This may be useful for sharing files. You should
  1279. +also use it carefully as using it incorrectly can cause security
  1280. +problems.
  1281. +
  1282. +This user name only gets used once a connection is established. Thus
  1283. +clients still need to connect as a valid user and supply a valid
  1284. +password. Once connected, all file operations will be performed as the
  1285. +"forced user", not matter what username the client connected as.
  1286. +
  1287. +.B Default:
  1288. +       no forced user
  1289. +
  1290. +.B Example:
  1291. +       force user = auser
  1292. +
  1293. +.SS guest account (S)
  1294. +This is a username which will be used for access to services which are
  1295. +specified as 'guest ok' (see below). Whatever privileges this user has
  1296. +will be available to any client connecting to the guest
  1297. +service. Typically this user will exist in the password file, but will
  1298. +not have a valid login. If a username is specified in a given service,
  1299. +the specified username overrides this one.
  1300. +
  1301. +One some systems the account "nobody" may not be able to print. Use
  1302. +another account in this case. You should test this by trying to log in
  1303. +as your guest user (perhaps by using the "su -" command) and trying to
  1304. +print using lpr.
  1305. +
  1306. +Note that as of version 1.9 of Samba this option may be set
  1307. +differently for each service.
  1308. +
  1309. +.B Default:
  1310. +     specified at compile time
  1311. +
  1312. +.B Example:
  1313. +     guest account = nobody
  1314. +.SS getwd cache (G)
  1315. +This is a tuning option. When this is enabled a cacheing algorithm will
  1316. +be used to reduce the time taken for getwd() calls. This can have a
  1317. +significant impact on performance, especially when widelinks is False.
  1318. +
  1319. +.B Default:
  1320. +     getwd cache = No
  1321. +
  1322. +.B Example:
  1323. +     getwd cache = Yes
  1324. +.SS guest ok (S)
  1325. +See
  1326. +.B public.
  1327. +.SS guest only (S)
  1328. +If this parameter is 'yes' for a service, then only guest connections to the
  1329. +service are permitted. This parameter will have no affect if "guest ok" or
  1330. +"public" is not set for the service.
  1331. +
  1332. +See the section below on user/password validation for more information about
  1333. +this option.
  1334. +
  1335. +.B Default:
  1336. +     guest only = no
  1337. +
  1338. +.B Example:
  1339. +     guest only = yes
  1340. +.SS hide dot files (S)
  1341. +This is a boolean parameter that controls whether files starting with
  1342. +a dot appear as hidden files.
  1343. +
  1344. +.B Default:
  1345. +    hide dot files = yes
  1346. +
  1347. +.B Example:
  1348. +    hide dot files = no
  1349. +.SS hosts allow (S)
  1350. +See
  1351. +.B allow hosts.
  1352. +.SS hosts deny (S)
  1353. +See
  1354. +.B deny hosts.
  1355. +
  1356. +.SS group (S)
  1357. +This is an alias for "force group" and is only kept for compatability
  1358. +with old versions of Samba. It may be removed in future versions.
  1359. +
  1360. +.SS hosts equiv (G)
  1361. +If this global parameter is a non-null string, it specifies the name of
  1362. +a file to read for the names of hosts and users who will be allowed access
  1363. +without specifying a password.
  1364. +
  1365. +This is not be confused with 
  1366. +.B allow hosts
  1367. +which is about hosts access to services and is more useful for guest services.
  1368. +.B hosts equiv
  1369. +may be useful for NT clients which will not supply passwords to samba.
  1370. +
  1371. +NOTE: The use of hosts.equiv can be a major security hole. This is
  1372. +because you are trusting the PC to supply the correct username. It is
  1373. +very easy to get a PC to supply a false username. I recommend that the
  1374. +hosts.equiv option be only used if you really know what you are doing,
  1375. +or perhaps on a home network where you trust your wife and kids :-)
  1376. +
  1377. +.B Default
  1378. +    No host equivalences
  1379. +
  1380. +.B Example
  1381. +    hosts equiv = /etc/hosts.equiv
  1382. +
  1383. +.SS invalid users (S)
  1384. +This is a list of users that should not be allowed to login to this
  1385. +service. This is really a "paranoid" check to absolutely ensure an
  1386. +improper setting does not breach your security.
  1387. +
  1388. +A name starting with @ is interpreted as a unix group.
  1389. +
  1390. +The current servicename is substituted for %S. This is useful in the
  1391. +[homes] section.
  1392. +
  1393. +See also "valid users"
  1394. +
  1395. +.B Default
  1396. +    No invalid users
  1397. +
  1398. +.B Example
  1399. +    invalid users = root fred admin @wheel
  1400. +
  1401. +.SS include (G)
  1402. +
  1403. +This allows you to inlcude one config file inside another. the file is
  1404. +included literally, as though typed in place.
  1405. +
  1406. +It takes the standard substitutions, except %u, %P and %S
  1407. +
  1408. +.SS keep alive (G)
  1409. +The value of the parameter (an integer) represents the number of seconds 
  1410. +between 'keepalive' packets. If this parameter is zero, no keepalive packets
  1411. +will be sent. Keepalive packets, if sent, allow the server to tell whether a
  1412. +client is still present and responding.
  1413. +
  1414. +Keepalives should, in general, not be needed if the socket being used
  1415. +has the SO_KEEPALIVE attribute set on it (see "socket
  1416. +options"). Basically you should only use this option if you strike
  1417. +difficulties.
  1418. +
  1419. +.B Default:
  1420. +     keep alive = 0
  1421. +
  1422. +.B Example:
  1423. +     keep alive = 60
  1424. +.SS load printers (G)
  1425. +A boolean variable that controls whether all printers in the printcap
  1426. +will be loaded for browsing by default. 
  1427. +
  1428. +.B Default:
  1429. +    load printers = no
  1430. +
  1431. +.B Example:
  1432. +    load printers = yes
  1433. +
  1434. +.SS lock directory (G)
  1435. +This options specifies the directory where lock files will be placed.
  1436. +The lock files are used to implement the "max connections" option.
  1437. +
  1438. +.B Default:
  1439. +    lock directory = /tmp/samba
  1440. +
  1441. +.B Example: 
  1442. +    lock directory = /usr/local/samba/locks
  1443. +.SS locking (S)
  1444. +This controls whether or not locking will be performed by the server in 
  1445. +response to lock requests from the client.
  1446. +
  1447. +If "locking = no", all lock and unlock requests will appear to succeed and 
  1448. +all lock queries will indicate that the queried lock is clear.
  1449. +
  1450. +If "locking = yes", real locking will be performed by the server.
  1451. +
  1452. +This option may be particularly useful for read-only filesystems which
  1453. +do not need locking (such as cdrom drives).
  1454. +
  1455. +Be careful about disabling locking either globally or in a specific
  1456. +service, as lack of locking may result in data corruption.
  1457. +
  1458. +.B Default:
  1459. +     locking = yes
  1460. +
  1461. +.B Example:
  1462. +     locking = no
  1463. +
  1464. +.SS log file (G)
  1465. +
  1466. +This options allows you to override the name of the Samba log file
  1467. +(also known as the debug file).
  1468. +
  1469. +This option takes the standard substitutions, allowing you to have
  1470. +separate log files for each user or machine.
  1471. +
  1472. +.B Example:
  1473. +    log file = /usr/local/samba/log.%m
  1474. +
  1475. +.SS log level (G)
  1476. +see "debug level"
  1477. +
  1478. +.SS lpq cache time (G)
  1479. +
  1480. +This controls how long lpq info will be cached for to prevent the lpq
  1481. +command being called too often. A separate cache is kept for each
  1482. +variation of the lpq command used by the system, so if you use
  1483. +different lpq commands for different users then they won't share cache
  1484. +information.
  1485. +
  1486. +The cache files are stored in /tmp/lpq.xxxx where xxxx is a hash
  1487. +of the lpq command in use.
  1488. +
  1489. +The default is 10 seconds, meaning that the cached results of a
  1490. +previous identical lpq command will be used if the cached data is less
  1491. +than 10 seconds old. A large value may be advisable if your lpq
  1492. +command is very slow.
  1493. +
  1494. +A value of 0 will disable cacheing completely.
  1495. +
  1496. +.B Default:
  1497. +    lpq cache time = 10
  1498. +
  1499. +.B Example:
  1500. +    lpq cache time = 30
  1501. +
  1502. +.SS lpq command (S)
  1503. +This parameter specifies the command to be executed on the server host in
  1504. +order to obtain "lpq"-style printer status information. 
  1505. +
  1506. +This command should be a program or script which takes a printer name
  1507. +as its only parameter and outputs printer status information. 
  1508. +
  1509. +Currently four styles of printer status information are supported;
  1510. +BSD, SYSV, AIX and HPUX. This covers most unix systems. You control
  1511. +which type is expected using the "printing =" option.
  1512. +
  1513. +Some clients (notably Windows for Workgroups) may not correctly send the
  1514. +connection number for the printer they are requesting status information
  1515. +about. To get around this, the server reports on the first printer service
  1516. +connected to by the client. This only happens if the connection number sent
  1517. +is invalid.
  1518. +
  1519. +If a %p is given then the printername is put in it's place. Otherwise
  1520. +it is placed at the end of the command.
  1521. +
  1522. +Note that it is good practice to include the absolute path in the lpq
  1523. +command as the PATH may not be available to the server.
  1524. +
  1525. +.B Default:
  1526. +        depends on the setting of "printing ="
  1527. +
  1528. +.B Example:
  1529. +     lpq command = /usr/bin/lpq %p
  1530. +
  1531. +.SS lprm command (S)
  1532. +This parameter specifies the command to be executed on the server host in
  1533. +order to delete a print job.
  1534. +
  1535. +This command should be a program or script which takes a printer name
  1536. +and job number, and deletes the print job.
  1537. +
  1538. +Currently four styles of printer control are supported; BSD, SYSV, AIX
  1539. +and HPUX. This covers most unix systems. You control which type is
  1540. +expected using the "printing =" option.
  1541. +
  1542. +If a %p is given then the printername is put in it's place. A %j is
  1543. +replaced with the job number (an integer).
  1544. +
  1545. +Note that it is good practice to include the absolute path in the lprm
  1546. +command as the PATH may not be available to the server.
  1547. +
  1548. +.B Default:
  1549. +        depends on the setting of "printing ="
  1550. +
  1551. +.B Example 1:
  1552. +     lprm command = /usr/bin/lprm -P%p %j
  1553. +
  1554. +.B Example 1:
  1555. +     lprm command = /usr/bin/cancel %p-%j
  1556. +
  1557. +.SS magic output (S)
  1558. +This parameter specifies the name of a file which will contain output
  1559. +created by a magic script (see
  1560. +.I magic script
  1561. +below).
  1562. +
  1563. +Warning: If two clients use the same magic script in the same directory the
  1564. +output file content is undefined.
  1565. +.B Default:
  1566. +     magic output = <magic script name>.out
  1567. +
  1568. +.B Example:
  1569. +     magic output = myfile.txt
  1570. +.SS magic script (S)
  1571. +This parameter specifies the name of a file which, if opened, will be
  1572. +executed by the server when the file is closed. This allows a Unix script
  1573. +to be sent to the Samba host and executed on behalf of the connected user.
  1574. +
  1575. +Scripts executed in this way will be deleted upon completion, permissions
  1576. +permitting.
  1577. +
  1578. +If the script generates output, output will be sent to the file specified by
  1579. +the
  1580. +.I magic output
  1581. +parameter (see above).
  1582. +
  1583. +Note that some shells are unable to interpret scripts containing
  1584. +carriage-return-linefeed instead of linefeed as the end-of-line
  1585. +marker. Magic scripts must be executable "as is" on the host, which
  1586. +for some hosts and some shells will require filtering at the DOS end.
  1587. +
  1588. +Magic scripts are EXPERIMENTAL and should NOT be relied upon.
  1589. +.B Default:
  1590. +     None. Magic scripts disabled.
  1591. +
  1592. +.B Example:
  1593. +     magic script = user.csh
  1594. +.SS mangled map (S)
  1595. +This is for those who want to directly map UNIX file names which are
  1596. +not representable on DOS.  The mangling of names is not always what is
  1597. +needed.  In particular you may have documents with file extensiosn
  1598. +that differ between dos and unix. For example, under unix it is common
  1599. +to use .html for HTML files, whereas under dos .htm is more commonly
  1600. +used.
  1601. +
  1602. +So to map 'html' to 'htm' you put:
  1603. +
  1604. +  mangled map = (*.html *.htm)
  1605. +
  1606. +One very useful case is to remove the annoying ;1 off the ends of
  1607. +filenames on some CDROMS (only visible under some unixes). To do this
  1608. +use a map of (*;1 *)
  1609. +
  1610. +.B default:
  1611. +    no mangled map
  1612. +
  1613. +.B Example:
  1614. +    mangled map = (*;1 *)
  1615. +
  1616. +.SS mangle case (S)
  1617. +
  1618. +See the section on "NAME MANGLING"
  1619. +
  1620. +.SS mangled names (S)
  1621. +This controls whether non-DOS names under Unix should be mapped to
  1622. +DOS-compatible names ("mangled") and made visible, or whether non-DOS names
  1623. +should simply be ignored.
  1624. +
  1625. +See the section on "NAME MANGLING" for details on how to control the
  1626. +mangling process.
  1627. +
  1628. +If mangling is used then the mangling algorithm is as follows:
  1629. +.RS
  1630. +- the first (up to) five alphanumeric characters before the rightmost dot of
  1631. +the filename are preserved, forced to upper case, and appear as the first (up
  1632. +to) five characters of the mangled name.
  1633. +
  1634. +- a tilde ("~") is appended to the first part of the mangled name, followed
  1635. +by a two-character unique sequence, based on the origonal root name 
  1636. +(i.e., the original filename minus its final extension). The final
  1637. +extension is included in the hash calculation only if it contains any upper
  1638. +case characters or is longer than three characters.
  1639. +
  1640. +Note that the character to use may be specified using the "mangling
  1641. +char" option, if you don't like ~.
  1642. +
  1643. +- the first three alphanumeric characters of the final extension are preserved,
  1644. +forced to upper case and appear as the extension of the mangled name. The 
  1645. +final extension is defined as that part of the original filename after the
  1646. +rightmost dot. If there are no dots in the filename, the mangled name will
  1647. +have no extension (except in the case of hidden files - see below).
  1648. +
  1649. +- files whose Unix name begins with a dot will be presented as DOS hidden
  1650. +files. The mangled name will be created as for other filenames, but with the
  1651. +leading dot removed and "___" as its extension regardless of actual original
  1652. +extension (that's three underscores).
  1653. +.RE
  1654. +
  1655. +The two-digit hash value consists of upper case alphanumeric characters.
  1656. +
  1657. +This algorithm can cause name collisions only if files in a directory share
  1658. +the same first five alphanumeric characters. The probability of such a clash 
  1659. +is 1/1300.
  1660. +
  1661. +The name mangling (if enabled) allows a file to be copied between Unix
  1662. +directories from DOS while retaining the long Unix filename. Unix files can
  1663. +be renamed to a new extension from DOS and will retain the same basename. 
  1664. +Mangled names do not change between sessions.
  1665. +
  1666. +.B Default:
  1667. +     mangled names = yes
  1668. +
  1669. +.B Example:
  1670. +     mangled names = no
  1671. +.SS mangling char (S)
  1672. +This controls what character is used as the "magic" character in name
  1673. +mangling. The default is a ~ but this may interfere with some
  1674. +software. Use this option to set it to whatever you prefer.
  1675. +
  1676. +.B Default:
  1677. +     mangling char = ~
  1678. +
  1679. +.B Example:
  1680. +     mangling char = ^
  1681. +
  1682. +.SS max disk size (G)
  1683. +
  1684. +This option helps with large disks and applications that can't handle
  1685. +them. You use it to pretend to the client that the disk is smaller,
  1686. +but the client will still be able to use all available disk space.
  1687. +
  1688. +You specify the size in MB. A size of less than 1024 will fix problems
  1689. +with fussy programs.
  1690. +
  1691. +By default the "max disk size" is 0, which means no maximum.
  1692. +
  1693. +.B Example:
  1694. +    max disk size = 1024
  1695. +
  1696. +.SS max log file (G)
  1697. +
  1698. +This option (an integer in kilobytes) specifies the max size the log
  1699. +file should grow to. Samba periodically checks the size and if it is
  1700. +exceeded it will rename the file, adding a .old extension.
  1701. +
  1702. +A size of 0 means no limit.
  1703. +
  1704. +.B Default:
  1705. +    max log size = 5000
  1706. +
  1707. +.B Example:
  1708. +     max log size = 1000
  1709. +
  1710. +.SS max xmit (G)
  1711. +
  1712. +This option controls the maximum packet size that will be negotiated
  1713. +by Samba. The default is 65535, which is the maximum. In some cases
  1714. +you may find you get better performance with a smaller value. A value
  1715. +below 2048 is likely to cause problems.
  1716. +
  1717. +.B Default:
  1718. +    max xmit = 65535
  1719. +
  1720. +.B Example:
  1721. +     max xmit = 8192
  1722. +
  1723. +.SS mangled stack (G)
  1724. +This parameter controls the number of mangled names that should be cached in
  1725. +the Samba server.
  1726. +
  1727. +This stack is a list of recently mangled base names (extensions are only
  1728. +maintained if they are longer than 3 characters or contains upper case
  1729. +characters).
  1730. +
  1731. +The larger this value, the more likely it is that mangled names can be
  1732. +successfully converted to correct long Unix names. However, large stack
  1733. +sizes will slow most directory access. Smaller stacks save memory in the
  1734. +server (each stack element costs 256 bytes).
  1735. +
  1736. +It is not possible to absolutely guarantee correct long file names, so
  1737. +be prepared for some surprises!
  1738. +
  1739. +.B Default:
  1740. +     mangled stack = 50
  1741. +
  1742. +.B Example:
  1743. +     mangled stack = 100
  1744. +
  1745. +.SS map archive (S)
  1746. +This controls whether the DOS archive attribute should be mapped to Unix
  1747. +execute bits.  The DOS archive bit is set when a file has been modified
  1748. +since its last backup.  One motivation for this option it to keep Samba/your
  1749. +PC from making any file it touches from becoming executable under UNIX.
  1750. +This can be quite annoying for shared source code, documents,  etc...
  1751. +
  1752. +.B Default:
  1753. +      map archive = yes
  1754. +
  1755. +.B Example:
  1756. +      map archive = no
  1757. +
  1758. +.SS map hidden (S)
  1759. +This controls whether DOS style hidden files should be mapped to Unix
  1760. +execute bits.
  1761. +
  1762. +.B Default:
  1763. +     map hidden = no
  1764. +
  1765. +.B Example:
  1766. +     map hidden = yes
  1767. +.SS map system (S)
  1768. +This controls whether DOS style system files should be mapped to Unix
  1769. +execute bits.
  1770. +
  1771. +.B Default:
  1772. +     map system = no
  1773. +
  1774. +.B Example:
  1775. +     map system = yes
  1776. +.SS max connections (S)
  1777. +This option allows the number of simultaneous connections to a
  1778. +service to be limited. If "max connections" is greater than 0 then
  1779. +connections will be refused if this number of connections to the
  1780. +service are already open. A value of zero mean an unlimited number of
  1781. +connections may be made.
  1782. +
  1783. +Record lock files are used to implement this feature. The lock files
  1784. +will be stored in the directory specified by the "lock directory" option.
  1785. +
  1786. +.B Default:
  1787. +    max connections = 0
  1788. +
  1789. +.B Example:
  1790. +    max connections = 10
  1791. +.SS only user (S)
  1792. +This is a boolean option that controls whether connections with
  1793. +usernames not in the user= list will be allowed. By default this
  1794. +option is disabled so a client can supply a username to be used by
  1795. +the server.
  1796. +
  1797. +Note that this also means Samba won't try to deduce usernames from the
  1798. +service name. This can be annoying for the [homes] section. To get
  1799. +around this you could use "user = %S" which means your "user" list
  1800. +will be just the service name, which for home directories is the name
  1801. +of the user.
  1802. +
  1803. +.B Default: 
  1804. +    only user = False
  1805. +
  1806. +.B Example: 
  1807. +    only user = True
  1808. +
  1809. +.SS message command (G)
  1810. +
  1811. +This specifies what command to run when the server receives a WinPopup
  1812. +style message.
  1813. +
  1814. +This would normally be a command that would deliver the message
  1815. +somehow. How this is to be done is up to your imagination.
  1816. +
  1817. +What I use is:
  1818. +
  1819. +   message command = csh -c 'xedit %s;rm %s' &
  1820. +
  1821. +This delivers the message using xedit, then removes it
  1822. +afterwards. NOTE THAT IT IS VERY IMPORTANT THAT THIS COMMAND RETURN
  1823. +IMMEDIATELY. That's why I have the & on the end. If it doesn't return
  1824. +immediately then your PCs may freeze when sending messages (they
  1825. +should recover after 30secs, hopefully).
  1826. +
  1827. +All messages are delivered as the global guest user. The command takes
  1828. +the standard substitutions, although %u won't work (%U may be better
  1829. +in this case).
  1830. +
  1831. +Apart from the standard substitutions, some additional ones apply. In
  1832. +particular:
  1833. +
  1834. +%s = the filename containing the message
  1835. +
  1836. +%t = the destination that the message was sent to (probably the server
  1837. +name)
  1838. +
  1839. +%f = who the message is from
  1840. +
  1841. +You could make this command send mail, or whatever else takes your
  1842. +fancy. Please let me know of any really interesting ideas you have.
  1843. +
  1844. +Here's a way of sending the messages as mail to root:
  1845. +
  1846. +message command = /bin/mail -s 'message from %f on %m' root < %s; rm %s
  1847. +
  1848. +If you don't have a message command then the message won't be
  1849. +delivered and Samba will tell the sender there was an
  1850. +error. Unfortunately WfWg totally ignores the error code and carries
  1851. +on regardless, saying that the message was delivered.
  1852. +
  1853. +If you want to silently delete it then try "message command = rm %s".
  1854. +
  1855. +For the really adventurous, try something like this:
  1856. +
  1857. +message command = csh -c 'csh < %s |& /usr/local/samba/smbclient \
  1858. +                  -M %m; rm %s' &
  1859. +
  1860. +this would execute the command as a script on the server, then give
  1861. +them the result in a WinPopup message. Note that this could cause a
  1862. +loop if you send a message from the server using smbclient! You better
  1863. +wrap the above in a script that checks for this :-)
  1864. +
  1865. +.B Default:
  1866. +    no message command
  1867. +
  1868. +.B Example:
  1869. +        message command = csh -c 'xedit %s;rm %s' &
  1870. +
  1871. +.SS min print space (S)
  1872. +
  1873. +This sets the minimum amount of free disk space that must be available
  1874. +before a user will be able to spool a print job. It is specified in
  1875. +kilobytes. The default is 0, which means no limit.
  1876. +
  1877. +.B Default:
  1878. +    min print space = 0
  1879. +
  1880. +.B Example:
  1881. +    min print space = 2000
  1882. +
  1883. +.SS null passwords (G)
  1884. +Allow or disallow access to accounts that have null passwords. 
  1885. +
  1886. +.B Default:
  1887. +    null passwords = no
  1888. +
  1889. +.B Example:
  1890. +    null passwords = yes
  1891. +
  1892. +.SS os level (G)
  1893. +This integer value controls what level Samba advertises itself as for
  1894. +browse elections. See BROWSING.txt for details.
  1895. +
  1896. +.SS packet size (G)
  1897. +The maximum transmit packet size during a raw read. This option is no
  1898. +longer implemented as of version 1.7.00, and is kept only so old
  1899. +configuration files do not become invalid.
  1900. +
  1901. +.SS passwd chat (G)
  1902. +This string coontrols the "chat" conversation that takes places
  1903. +between smbd and the local password changing program to change the
  1904. +users password. The string describes a sequence of response-receive
  1905. +pairs that smbd uses to determine what to send to the passwd program
  1906. +and what to expect back. If the expected output is not received then
  1907. +the password is not changed.
  1908. +
  1909. +This chat sequence is often quite site specific, deppending on what
  1910. +local methods are used for password control (such as NIS+ etc).
  1911. +
  1912. +The string can contain the macros %o and %n which are substituted for
  1913. +the old and new passwords respectively. It can aso contain the
  1914. +standard macros \\n \\r \\t and \\s to give line-feed, carriage-return,
  1915. +tab and space.
  1916. +
  1917. +The string can also contain a * which matches any sequence of
  1918. +characters.
  1919. +
  1920. +Double quotes can be used to collect strings with spaces in them into
  1921. +a single string.
  1922. +
  1923. +If the send string in any part of the chat sequence is a fullstop "."
  1924. +then no string is sent. Similarly, is the expect string is a fullstop
  1925. +then no string is expected.
  1926. +
  1927. +.B Example:
  1928. +    passwd chat = "*Enter OLD password*" %o\\n "*Enter NEW password*" %n\\n \\
  1929. +                      "*Reenter NEW password*" %n\\n "*Password changed*"
  1930. +
  1931. +.B Default:
  1932. +    passwd chat = *old*password* %o\\n *new*password* %n\\n *new*password* %n\\n *changed*
  1933. +
  1934. +.SS passwd program (G)
  1935. +The name of a program that can be used to set user passwords.
  1936. +
  1937. +This is only necessary if you have enabled remote password changing at
  1938. +compile time. Any occurances of %u will be replaced with the user
  1939. +name.
  1940. +
  1941. +Also note that many passwd programs insist in "reasonable" passwords,
  1942. +such as a minimum length, or the inclusion of mixed case chars and
  1943. +digits. This can pose a problem as some clients (such as Windows for
  1944. +Workgroups) uppercase the password before sending it. 
  1945. +
  1946. +.B Default:
  1947. +    passwd program = /bin/passwd
  1948. +
  1949. +.B Example:
  1950. +    passwd program = /sbin/passwd %u
  1951. +
  1952. +.SS password level (G)
  1953. +Some client/server conbinations have difficulty with mixed-case passwords.
  1954. +One offending client is Windows for Workgroups, which for some reason forces
  1955. +passwords to upper case when using the LANMAN1 protocol, but leaves them alone
  1956. +when using COREPLUS!
  1957. +
  1958. +This parameter defines the maximum number of characters that may be upper case
  1959. +in passwords.
  1960. +
  1961. +For example, say the password given was "FRED". If
  1962. +.B password level
  1963. +is set to 1 (one), the following combinations would be tried if "FRED" failed:
  1964. +"Fred", "fred", "fRed", "frEd", "freD". If
  1965. +.B password level was set to 2 (two), the following combinations would also be
  1966. +tried: "FRed", "FrEd", "FreD", "fREd", "fReD", "frED". And so on.
  1967. +
  1968. +The higher value this parameter is set to the more likely it is that a mixed
  1969. +case password will be matched against a single case password. However, you
  1970. +should be aware that use of this parameter reduces security and increases the
  1971. +time taken to process a new connection.
  1972. +
  1973. +A value of zero will cause only two attempts to be made - the password as is
  1974. +and the password in all-lower case.
  1975. +
  1976. +If you find the connections are taking too long with this option then
  1977. +you probably have a slow crypt() routine. Samba now comes with a fast
  1978. +"ufc crypt" that you can select in the Makefile. You should also make
  1979. +sure the PASSWORD_LENGTH option is correct for your system in local.h
  1980. +and includes.h. On most systems only the first 8 chars of a password
  1981. +are significant so PASSWORD_LENGTH should be 8, but on some longer
  1982. +passwords are significant. The inlcudes.h file tries to select the
  1983. +right length for your system.
  1984. +
  1985. +.B Default:
  1986. +     password level = 0
  1987. +
  1988. +.B Example:
  1989. +     password level = 4
  1990. +
  1991. +.SS password server (G)
  1992. +
  1993. +By specifying the name of another SMB server (such as a WinNT box)
  1994. +with this option, and using "security = server" you can get Samba to
  1995. +do all it's username/password validation via a remote server.
  1996. +
  1997. +This options sets the name of the password server to use. It must be a
  1998. +netbios name, so if the machines netbios name is different from it's
  1999. +internet name then you may have to add it's netbios name to
  2000. +/etc/hosts.
  2001. +
  2002. +The password server much be a machine capable of using the "LM1.2X002"
  2003. +or the "LM NT 0.12" protocol, and it must be in user level security
  2004. +mode. 
  2005. +
  2006. +NOTE: Using a password server means your unix box (running Samba) is
  2007. +only as secure as your password server. DO NOT CHOOSE A PASSWORD
  2008. +SERVER THAT YOU DON'T COMPLETELY TRUST.
  2009. +
  2010. +Never point a Samba server at itself for password serving. This will
  2011. +cause a loop and could lock up your Samba server!
  2012. +
  2013. +The name of the password server takes the standard substitutions, but
  2014. +probably the only useful one is %m, which means the Samba server will
  2015. +use the incoming client as the password server. If you use this then
  2016. +you better trust your clients, and you better restrict them with hosts
  2017. +allow!
  2018. +
  2019. +.SS path (S)
  2020. +A synonym for this parameter is 'directory'.
  2021. +
  2022. +This parameter specifies a directory to which the user of the service is to
  2023. +be given access. In the case of printable services, this is where print data 
  2024. +will spool prior to being submitted to the host for printing.
  2025. +
  2026. +For a printable service offering guest access, the service should be readonly
  2027. +and the path should be world-writable and have the sticky bit set. This is not
  2028. +mandatory of course, but you probably won't get the results you expect if you
  2029. +do otherwise.
  2030. +
  2031. +Any occurances of %u in the path will be replaced with the username
  2032. +that the client is connecting as. Any occurances of %m will be
  2033. +replaced by the name of the machine they are connecting from. These
  2034. +replacements are very useful for setting up pseudo home directories
  2035. +for users.
  2036. +
  2037. +Note that this path will be based on 'root dir' if one was specified.
  2038. +.B Default:
  2039. +     none
  2040. +
  2041. +.B Example:
  2042. +     path = /home/fred+ 
  2043. +
  2044. +.SS postexec (S)
  2045. +
  2046. +This option specifies a command to be run whenever the service is
  2047. +disconnected. It takes the usual substitutions. The command may be run
  2048. +as the root on some systems.
  2049. +
  2050. +An interesting example may be do unmount server resources:
  2051. +
  2052. +postexec = /etc/umount /cdrom
  2053. +
  2054. +See also preexec
  2055. +
  2056. +.B Default:
  2057. +      none (no command executed)
  2058. +
  2059. +.B Example:
  2060. +      postexec = echo \"%u disconnected from %S from %m (%I)\" >> /tmp/log
  2061. +
  2062. +.SS postscript (S)
  2063. +This parameter forces a printer to interpret the print files as
  2064. +postscript. This is done by adding a %! to the start of print output. 
  2065. +
  2066. +This is most useful when you have lots of PCs that persist in putting
  2067. +a control-D at the start of print jobs, which then confuses your
  2068. +printer.
  2069. +
  2070. +.B Default: 
  2071. +    postscript = False
  2072. +
  2073. +.B Example: 
  2074. +    postscript = True
  2075. +
  2076. +.SS preexec (S)
  2077. +
  2078. +This option specifies a command to be run whenever the service is
  2079. +connected to. It takes the usual substitutions.
  2080. +
  2081. +An interesting example is to send the users a welcome message every
  2082. +time they log in. Maybe a message of the day? Here is an example:
  2083. +
  2084. +preexec = csh -c 'echo \"Welcome to %S!\" | \
  2085. +       /usr/local/samba/smbclient -M %m -I %I' &
  2086. +
  2087. +Of course, this could get annoying after a while :-)
  2088. +
  2089. +See also postexec
  2090. +
  2091. +.B Default:
  2092. +    none (no command executed)
  2093. +
  2094. +.B Example:
  2095. +    preexec = echo \"%u connected to %S from %m (%I)\" >> /tmp/log
  2096. +
  2097. +.SS preferred master (G)
  2098. +This boolean parameter controls if Samba is a preferred master browser
  2099. +for its workgroup. Setting this gives it a slight edge in elections
  2100. +and also means it will automatically start an election when it starts
  2101. +up. 
  2102. +
  2103. +It is on by default.
  2104. +
  2105. +.SS preload
  2106. +This is an alias for "auto services"
  2107. +
  2108. +.SS preserve case (S)
  2109. +
  2110. +This controls if new filenames are created with the case that the
  2111. +client passes, or if they are forced to be the "default" case.
  2112. +
  2113. +.B Default:
  2114. +       preserve case = no
  2115. +
  2116. +See the section on "NAME MANGLING" for a fuller discussion.
  2117. +
  2118. +.SS print command (S)
  2119. +After a print job has finished spooling to a service, this command will be
  2120. +used via a system() call to process the spool file. Typically the command 
  2121. +specified will submit the spool file to the host's printing subsystem, but
  2122. +there is no requirement that this be the case. The server will not remove the
  2123. +spool file, so whatever command you specify should remove the spool file when
  2124. +it has been processed, otherwise you will need to manually remove old spool
  2125. +files.
  2126. +
  2127. +The print command is simply a text string. It will be used verbatim,
  2128. +with two exceptions: All occurrences of "%s" will be replaced by the
  2129. +appropriate spool file name, and all occurrences of "%p" will be
  2130. +replaced by the appropriate printer name. The spool file name is
  2131. +generated automatically by the server, the printer name is discussed
  2132. +below.
  2133. +
  2134. +The full path name will be used for the filename if %s is not preceded
  2135. +by a /. If you don't like this (it can stuff up some lpq output) then
  2136. +use %f instead. Any occurances of %f get replaced by the spool
  2137. +filename without the full path at the front.
  2138. +
  2139. +The print command MUST contain at least one occurrence of "%s" or %f -
  2140. +the "%p" is optional. At the time a job is submitted, if no printer
  2141. +name is supplied the "%p" will be silently removed from the printer
  2142. +command.
  2143. +
  2144. +If specified in the [global] section, the print command given will be used
  2145. +for any printable service that does not have its own print command specified.
  2146. +
  2147. +If there is neither a specified print command for a printable service nor a 
  2148. +global print command, spool files will be created but not processed and (most
  2149. +importantly) not removed.
  2150. +
  2151. +Note that printing may fail on some unixes from the "nobody"
  2152. +account. If this happens then create an alternative guest account that
  2153. +can print and set the "guest account" in the [global] section.
  2154. +
  2155. +You can form quite complex print commands by realising that they are
  2156. +just passed to a shell. For example the following will log a print
  2157. +job, print the file, then remove it. Note that ; is the usual
  2158. +separator for command in shell scripts.
  2159. +
  2160. +print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s
  2161. +
  2162. +You may have to vary this command considerably depending on how you
  2163. +normally print files on your system.
  2164. +
  2165. +.B Default:
  2166. +        print command = lpr -r -P %p %s
  2167. +
  2168. +.B Example:
  2169. +     print command = /usr/local/samba/myprintscript %p %s
  2170. +.SS print ok (S)
  2171. +See
  2172. +.B printable.
  2173. +.SS printable (S)
  2174. +A synonym for this parameter is 'print ok'.
  2175. +
  2176. +If this parameter is 'yes', then clients may open, write to and submit spool 
  2177. +files on the directory specified for the service.
  2178. +
  2179. +Note that a printable service will ALWAYS allow writing to the service path
  2180. +(user privileges permitting) via the spooling of print data. The 'read only'
  2181. +parameter controls only non-printing access to the resource.
  2182. +
  2183. +.B Default:
  2184. +     printable = no
  2185. +
  2186. +.B Example:
  2187. +     printable = yes
  2188. +
  2189. +.SS printing (G)
  2190. +This parameters controls how printer status information is interpreted
  2191. +on your system, and also affects the default values for the "print
  2192. +command", "lpq command" and "lprm command".
  2193. +
  2194. +Currently three printing styles are supported. They are "printing =
  2195. +bsd", "printing = sysv", "printing = hpux" and "printing = aix".
  2196. +
  2197. +To see what the defaults are for the other print commands when using
  2198. +these three options use the "testparm" program.
  2199. +
  2200. +
  2201. +.SS printcap name (G)
  2202. +This parameter may be used to override the compiled-in default printcap
  2203. +name used by the server (usually /etc/printcap). See the discussion of the
  2204. +[printers] section above for reasons why you might want to do this.
  2205. +
  2206. +For those of you without a printcap (say on SysV) you can just create a
  2207. +minimal file that looks like a printcap and set "printcap name =" in
  2208. +[global] to point at it.
  2209. +
  2210. +A minimal printcap file would look something like this:
  2211. +
  2212. +print1|My Printer 1
  2213. +print2|My Printer 2
  2214. +print3|My Printer 3
  2215. +print4|My Printer 4
  2216. +print5|My Printer 5
  2217. +
  2218. +where the | separates aliases of a printer. The fact that the second
  2219. +alias has a space in it gives a hint to Samba that it's a comment.
  2220. +
  2221. +NOTE: Under AIX the default printcap name is "/etc/qconfig". Samba
  2222. +will assume the file is in AIX "qconfig" format if the string
  2223. +"/qconfig" appears in the printcap filename.
  2224. +
  2225. +.B Default:
  2226. +     printcap name = /etc/printcap
  2227. +
  2228. +.B Example:
  2229. +     printcap name = /etc/myprintcap
  2230. +.SS printer (S)
  2231. +A synonym for this parameter is 'printer name'.
  2232. +
  2233. +This parameter specifies the name of the printer to which print jobs spooled
  2234. +through a printable service will be sent.
  2235. +
  2236. +If specified in the [global] section, the printer name given will be used
  2237. +for any printable service that does not have its own printer name specified.
  2238. +
  2239. +.B Default:
  2240. +     none (but may be 'lp' on many systems)
  2241. +
  2242. +.B Example:
  2243. +     printer name = laserwriter
  2244. +.SS printer name (S)
  2245. +See
  2246. +.B printer.
  2247. +.SS protocol (G)
  2248. +The value of the parameter (a string) is the highest protocol level that will
  2249. +be supported by the server. 
  2250. +
  2251. +Possible values are CORE, COREPLUS, LANMAN1, LANMAN2 and NT1. The relative
  2252. +merits of each are discussed in the README file.
  2253. +
  2254. +.B Default:
  2255. +    protocol = NT1
  2256. +
  2257. +.B Example:
  2258. +    protocol = LANMAN1
  2259. +.SS public (S)
  2260. +A synonym for this parameter is 'guest ok'.
  2261. +
  2262. +If this parameter is 'yes' for a service, then no password is required
  2263. +to connect to the service. Privileges will be those of the guest
  2264. +account.
  2265. +
  2266. +See the section below on user/password validation for more information about
  2267. +this option.
  2268. +
  2269. +.B Default:
  2270. +     public = no
  2271. +
  2272. +.B Example:
  2273. +     public = yes
  2274. +.SS read list (S)
  2275. +This is a list of users that are given read-only access to a
  2276. +service. If the connecting user is in this list then they will
  2277. +not be given write access, no matter what the "read only" option
  2278. +is set to. The list can include group names using the @group syntax.
  2279. +
  2280. +See also the "write list" option
  2281. +
  2282. +.B Default:
  2283. +     read list =
  2284. +
  2285. +.B Example:
  2286. +     read list = mary, @students
  2287. +
  2288. +.SS read only (S)
  2289. +See
  2290. +.B writable
  2291. +and
  2292. +.B write ok.
  2293. +Note that this is an inverted synonym for writable and write ok.
  2294. +.SS read prediction (G)
  2295. +This options enables or disables the read prediction code used to
  2296. +speed up reads from the server. When enabled the server will try to
  2297. +pre-read data from the last accessed file that was opened read-only
  2298. +while waiting for packets.
  2299. +
  2300. +.SS Default:
  2301. +    read prediction = False
  2302. +
  2303. +.SS Example:
  2304. +    read prediction = True
  2305. +.SS read raw (G)
  2306. +This parameter controls whether or not the server will support raw reads when
  2307. +transferring data to clients.
  2308. +
  2309. +If enabled, raw reads allow reads of 65535 bytes in one packet. This
  2310. +typically provides a major performance benefit.
  2311. +
  2312. +However, some clients either negotiate the allowable block size incorrectly
  2313. +or are incapable of supporting larger block sizes, and for these clients you
  2314. +may need to disable raw reads.
  2315. +
  2316. +In general this parameter should be viewed as a system tuning tool and left
  2317. +severely alone. See also
  2318. +.B write raw.
  2319. +
  2320. +.B Default:
  2321. +     read raw = yes
  2322. +
  2323. +.B Example:
  2324. +     read raw = no
  2325. +.SS read size (G)
  2326. +
  2327. +The option "read size" affects the overlap of disk reads/writes with
  2328. +network reads/writes. If the amount of data being transferred in
  2329. +several of the SMB commands (currently SMBwrite, SMBwriteX and
  2330. +SMBreadbraw) is larger than this value then the server begins writing
  2331. +the data before it has received the whole packet from the network, or
  2332. +in the case of SMBreadbraw, it begins writing to the network before
  2333. +all the data has been read from disk.
  2334. +
  2335. +This overlapping works best when the speeds of disk and network access
  2336. +are similar, having very little effect when the speed of one is much
  2337. +greater than the other.
  2338. +
  2339. +The default value is 2048, but very little experimentation has been
  2340. +done yet to determine the optimal value, and it is likely that the best
  2341. +value will vary greatly between systems anyway. A value over 65536 is
  2342. +pointless and will cause you to allocate memory unnecessarily.
  2343. +
  2344. +.B Default:
  2345. +    read size = 2048
  2346. +
  2347. +.B Example:
  2348. +    read size = 8192
  2349. +
  2350. +.SS revalidate (S)
  2351. +
  2352. +This options controls whether Samba will allow a previously validated
  2353. +username/password pair to be used to attach to a share. Thus if you
  2354. +connect to \\\\server\\share1 then to \\\\server\\share2 it won't
  2355. +automatically allow the client to request connection to the second
  2356. +share as the same username as the first without a password.
  2357. +
  2358. +If "revalidate" is True then the client will be denied automatic
  2359. +access as the same username.
  2360. +
  2361. +.B Default:
  2362. +    revalidate = False
  2363. +
  2364. +.B Example:
  2365. +    revalidate = True
  2366. +
  2367. +.SS root (G)
  2368. +See
  2369. +.B root directory.
  2370. +.SS root dir (G)
  2371. +See
  2372. +.B root directory.
  2373. +.SS root directory (G)
  2374. +Synonyms for this parameter are 'root dir' and 'root'.
  2375. +
  2376. +The server will chroot() to this directory on startup. This is not 
  2377. +strictly necessary for secure operation. Even without it the server
  2378. +will deny access to files not in one of the service entries. It may 
  2379. +also check for, and deny access to, soft links to other parts of the 
  2380. +filesystem, or attempts to use .. in file names to access other 
  2381. +directories (depending on the setting of the "wide links" parameter).
  2382. +
  2383. +Adding a "root dir" entry other than "/" adds an extra level of security, 
  2384. +but at a price. It absolutely ensures that no access is given to files not
  2385. +in the sub-tree specified in the "root dir" option, *including* some files 
  2386. +needed for complete operation of the server. To maintain full operability
  2387. +of the server you will need to mirror some system files into the "root dir"
  2388. +tree. In particular you will need to mirror /etc/passwd (or a subset of it),
  2389. +and any binaries or configuration files needed for printing (if required). 
  2390. +The set of files that must be mirrored is operating system dependent.
  2391. +
  2392. +.B Default:
  2393. +     root directory = /
  2394. +
  2395. +.B Example:
  2396. +     root directory = /homes/smb
  2397. +.SS security (G)
  2398. +This option does affects how clients respond to Samba.
  2399. +
  2400. +The option sets the "security mode bit" in replies to protocol negotiations
  2401. +to turn share level security on or off. Clients decide based on this bit 
  2402. +whether (and how) to transfer user and password information to the server.
  2403. +
  2404. +The default is "security=SHARE", mainly because that was the only
  2405. +option at one stage.
  2406. +
  2407. +The alternatives are "security = user" or "security = server". 
  2408. +
  2409. +If your PCs use usernames that are the same as their usernames on the
  2410. +unix machine then you will want to use "security = user". If you
  2411. +mostly use usernames that don't exist on the unix box then use
  2412. +"security = share".
  2413. +
  2414. +There is a bug in WfWg that may affect your decision. When in user
  2415. +level security a WfWg client will totally ignore the password you type
  2416. +in the "connect drive" dialog box. This makes it very difficult (if
  2417. +not impossible) to connect to a Samba service as anyone except the
  2418. +user that you are logged into WfWg as.
  2419. +
  2420. +If you use "security = server" then Samba will try to validate the
  2421. +username/password by passing it to another SMB server, such as an NT
  2422. +box. If this fails it will revert to "security = USER".
  2423. +
  2424. +See the "password server" option for more details.
  2425. +
  2426. +.B Default:
  2427. +     security = SHARE
  2428. +
  2429. +.B Example:
  2430. +     security = USER
  2431. +.SS server string (G)
  2432. +This controls what string will show up in the printer comment box in
  2433. +print manager and next to the IPC connection in "net view". It can be
  2434. +any string that you wish to show to your users.
  2435. +
  2436. +Note that it DOES NOT affect the string that appears in browse
  2437. +lists. That is controlled by a nmbd command line option instead.
  2438. +
  2439. +A %v will be replaced with the Samba version number.
  2440. +
  2441. +A %h will be replaced with the hostname.
  2442. +
  2443. +.B Default:
  2444. +    server string = Samba %v
  2445. +
  2446. +.B Example:
  2447. +    server string = University of GNUs Samba Server
  2448. +
  2449. +.SS smbrun (G)
  2450. +This sets the full path to the smbrun binary. This defaults to the
  2451. +value in the Makefile.
  2452. +
  2453. +You must get this path right for many services to work correctly.
  2454. +
  2455. +.B Default: taken from Makefile
  2456. +
  2457. +.B Example:
  2458. +    smbrun = /usr/local/samba/bin/smbrun
  2459. +
  2460. +.SS short preserve case (S)
  2461. +
  2462. +This controls if new short filenames are created with the case that
  2463. +the client passes, or if they are forced to be the "default" case.
  2464. +
  2465. +.B Default:
  2466. +       short preserve case = no
  2467. +
  2468. +See the section on "NAME MANGLING" for a fuller discussion.
  2469. +
  2470. +.SS root preexec (S)
  2471. +
  2472. +This is the same as preexec except that the command is run as
  2473. +root. This is useful for mounting filesystems (such as cdroms) before
  2474. +a connection is finalised.
  2475. +
  2476. +.SS root postexec (S)
  2477. +
  2478. +This is the same as postexec except that the command is run as
  2479. +root. This is useful for unmounting filesystems (such as cdroms) after
  2480. +a connection is closed.
  2481. +
  2482. +.SS set directory (S)
  2483. +If 'set directory = no', then users of the service may not use the setdir
  2484. +command to change directory.
  2485. +
  2486. +The setdir comand is only implemented in the Digital Pathworks client. See the
  2487. +Pathworks documentation for details.
  2488. +.B Default:
  2489. +     set directory = no
  2490. +
  2491. +.B Example:
  2492. +     set directory = yes
  2493. +
  2494. +.SS share modes (S)
  2495. +
  2496. +This enables or disables the honouring of the "share modes" during a
  2497. +file open. These modes are used by clients to gain exclusive read or
  2498. +write access to a file. 
  2499. +
  2500. +These open modes are not directly supported by unix, so they are
  2501. +simulated using lock files in the "lock directory". The "lock
  2502. +directory" specified in smb.conf must be readable by all users.
  2503. +
  2504. +The share modes that are enabled by this option are DENY_DOS,
  2505. +DENY_ALL, DENY_READ, DENY_WRITE, DENY_NONE and DENY_FCB.
  2506. +
  2507. +Enabling this option gives full share compatability but may cost a bit
  2508. +of processing time on the unix server. They are enabled by default.
  2509. +
  2510. +.B Default:
  2511. +    share modes = yes
  2512. +
  2513. +.B Example:
  2514. +    share modes = no
  2515. +
  2516. +.SS socket options (G)
  2517. +This option (which can also be invoked with the -O command line
  2518. +option) allows you to set socket options to be used when talking with
  2519. +the client.
  2520. +
  2521. +Socket options are controls on the networking layer of the operating
  2522. +systems which allow the connection to be tuned.
  2523. +
  2524. +This option will typically be used to tune your Samba server for
  2525. +optimal performance for your local network. There is no way that Samba
  2526. +can know what the optimal parameters are for your net, so you must
  2527. +experiment and choose them yourself. I strongly suggest you read the
  2528. +appropriate documentation for your operating system first (perhaps
  2529. +"man setsockopt" will help).
  2530. +
  2531. +You may find that on some systems Samba will say "Unknown socket
  2532. +option" when you supply an option. This means you either mis-typed it
  2533. +or you need to add an include file to includes.h for your OS. If the
  2534. +latter is the case please send the patch to me
  2535. +(samba-bugs@anu.edu.au).
  2536. +
  2537. +Any of the supported socket options may be combined in any way you
  2538. +like, as long as your OS allows it.
  2539. +
  2540. +This is the list of socket options currently settable using this
  2541. +option:
  2542. +
  2543. +  SO_KEEPALIVE
  2544. +
  2545. +  SO_REUSEADDR
  2546. +
  2547. +  SO_BROADCAST
  2548. +
  2549. +  TCP_NODELAY
  2550. +
  2551. +  IPTOS_LOWDELAY
  2552. +
  2553. +  IPTOS_THROUGHPUT
  2554. +
  2555. +  SO_SNDBUF *
  2556. +
  2557. +  SO_RCVBUF *
  2558. +
  2559. +  SO_SNDLOWAT *
  2560. +
  2561. +  SO_RCVLOWAT *
  2562. +
  2563. +Those marked with a * take an integer argument. The others can
  2564. +optionally take a 1 or 0 argument to enable or disable the option, by
  2565. +default they will be enabled if you don't specify 1 or 0.
  2566. +
  2567. +To specify an argument use the syntax SOME_OPTION=VALUE for example
  2568. +SO_SNDBUF=8192. Note that you must not have any spaces before or after
  2569. +the = sign.
  2570. +
  2571. +If you are on a local network then a sensible option might be
  2572. +
  2573. +socket options = IPTOS_LOWDELAY
  2574. +
  2575. +If you have an almost unloaded local network and you don't mind a lot
  2576. +of extra CPU usage in the server then you could try
  2577. +
  2578. +socket options = IPTOS_LOWDELAY TCP_NODELAY
  2579. +
  2580. +If you are on a wide area network then perhaps try setting
  2581. +IPTOS_THROUGHPUT. 
  2582. +
  2583. +Note that several of the options may cause your Samba server to fail
  2584. +completely. Use these options with caution!
  2585. +
  2586. +.B Default:
  2587. +    no socket options
  2588. +
  2589. +.B Example:
  2590. +    socket options = IPTOS_LOWDELAY    
  2591. +
  2592. +
  2593. +
  2594. +
  2595. +.SS status (G)
  2596. +This enables or disables logging of connections to a status file that
  2597. +smbstatus can read.
  2598. +
  2599. +With this disabled smbstatus won't be able to tell you what
  2600. +connections are active.
  2601. +
  2602. +.B Default:
  2603. +    status = yes
  2604. +
  2605. +.B Example:
  2606. +    status = no
  2607. +
  2608. +.SS strip dot (G)
  2609. +This is a boolean that controls whether to strup trailing dots off
  2610. +filenames. This helps with some CDROMs that have filenames ending in a
  2611. +single dot.
  2612. +
  2613. +NOTE: This option is now obsolete, and may be removed in future. You
  2614. +should use the "mangled map" option instead as it is much more
  2615. +general. 
  2616. +
  2617. +.SS strict locking (S)
  2618. +This is a boolean that controls the handling of file locking in the
  2619. +server. When this is set to yes the server will check every read and
  2620. +write access for file locks, and deny access if locks exist. This can
  2621. +be slow on some systems.
  2622. +
  2623. +When strict locking is "no" the server does file lock checks only when
  2624. +the client explicitly asks for them. 
  2625. +
  2626. +Well behaved clients always ask for lock checks when it is important,
  2627. +so in the vast majority of cases "strict locking = no" is preferable.
  2628. +
  2629. +.B Default:
  2630. +    strict locking = no
  2631. +
  2632. +.B Example:
  2633. +    strict locking = yes
  2634. +
  2635. +.SS sync always (S)
  2636. +
  2637. +This is a boolean parameter that controls whether writes will always
  2638. +be written to stable storage before the write call returns. If this is
  2639. +false then the server will be guided by the clients request in each
  2640. +write call (clients can set a bit indicating that a particular write
  2641. +should be synchronous). If this is true then every write will be
  2642. +followed by a fsync() call to ensure the data is written to disk.
  2643. +
  2644. +.B Default:
  2645. +    sync always = no
  2646. +
  2647. +.B Example:
  2648. +    sync always = yes
  2649. +
  2650. +.SS time offset (G)
  2651. +This parameter is a setting in minutes to add to the normal GMT to
  2652. +local time conversion. This is useful if you are serving a lot of PCs
  2653. +that have incorrect daylight saving time handling.
  2654. +
  2655. +.B Default:
  2656. +    time offset = 0
  2657. +
  2658. +.B Example:
  2659. +    time offset = 60
  2660. +
  2661. +.SS user (S)
  2662. +See
  2663. +.B username.
  2664. +.SS username (S)
  2665. +A synonym for this parameter is 'user'.
  2666. +
  2667. +Multiple users may be specified in a comma-delimited list, in which case the
  2668. +supplied password will be tested against each username in turn (left to right).
  2669. +
  2670. +The username= line is needed only when the PC is unable to supply it's own
  2671. +username. This is the case for the coreplus protocol or where your
  2672. +users have different WfWg usernames to unix usernames. In both these
  2673. +cases you may also be better using the \\\\server\\share%user syntax
  2674. +instead. 
  2675. +
  2676. +The username= line is not a great solution in many cases as it means Samba
  2677. +will try to validate the supplied password against each of the
  2678. +usernames in the username= line in turn. This is slow and a bad idea for
  2679. +lots of users in case of duplicate passwords. You may get timeouts or
  2680. +security breaches using this parameter unwisely.
  2681. +
  2682. +Samba relies on the underlying unix security. This parameter does not
  2683. +restrict who can login, it just offers hints to the Samba server as to
  2684. +what usernames might correspond to the supplied password. Users can
  2685. +login as whoever they please and they will be able to do no more
  2686. +damage than if they started a telnet session. The daemon runs as the
  2687. +user that they log in as, so they cannot do anything that user cannot
  2688. +do.
  2689. +
  2690. +To restrict a service to a particular set of users you can use the
  2691. +"valid users=" line.
  2692. +
  2693. +If any of the usernames begin with a @ then the name will be looked up
  2694. +in the groups file and will expand to a list of all users in the group
  2695. +of that name. Note that searching though a groups file can take quite
  2696. +some time, and some clients may time out during the search.
  2697. +
  2698. +See the section below on username/password validation for more information
  2699. +on how this parameter determines access to the services.
  2700. +
  2701. +.B Default:
  2702. +     The guest account if a guest service, else the name of the service.
  2703. +
  2704. +.B Examples:
  2705. +     username = fred
  2706. +     username = fred, mary, jack, jane, @users, @pcgroup
  2707. +
  2708. +.SS username map (G)
  2709. +
  2710. +This option allows you to to specify a file containing a mapping of
  2711. +usernames from the clients to the server. This can be used for several
  2712. +purposes. The most common is to map usernames that users use on dos or
  2713. +windows machines to those that the unix box uses. The other is to map
  2714. +multiple users to a single username so that they can more easily share
  2715. +files.
  2716. +
  2717. +The map file is parsed line by line. Each line should contain a single
  2718. +unix username on the left then a '=' followed by a list of usernames
  2719. +on the right. The list of usernames on the right may contain names of
  2720. +the form @group in which case they will match any unix username in
  2721. +that group. The special client name '*' is a wildcard and matches any
  2722. +name.
  2723. +
  2724. +The file is processed on each line by taking the supplied username and
  2725. +comparing it with each username on the right hand side of the '='
  2726. +signs. If the supplied name matrches any of the names on the right
  2727. +hand side then it is replaced with the name on the left. Processing
  2728. +then continues with the next line.
  2729. +
  2730. +If any line begins with a '#' or a ';' then it is ignored
  2731. +
  2732. +For example to map from he name "admin" or "administrator" to the unix
  2733. +name "root" you would use
  2734. +
  2735. +    root = admin administrator
  2736. +
  2737. +Or to map anyone in the unix group "system" to the unix name "sys" you
  2738. +would use
  2739. +
  2740. +    sys = @system
  2741. +
  2742. +You can have as many mappings as you like in a username map file.
  2743. +
  2744. +Note that the remapping is applied to all occurances of
  2745. +usernames. Thus if you connect to "\\\\server\\fred" and "fred" is
  2746. +remapped to "mary" then you will actually be connecting to
  2747. +"\\\\server\\mary" and will need to supply a password suitable for
  2748. +"mary" not "fred". The only exception to this is the username passwed
  2749. +to the "password server" (if you have one). The password server will
  2750. +receive whatever username the client supplies without modification.
  2751. +
  2752. +Also note that no reverse mapping is done. The main effect this has is
  2753. +with printing. Users who have been mapped may have trouble deleting
  2754. +print jobs as PrintManager under WfWg will think they don't own the
  2755. +print job.
  2756. +
  2757. +.B Default
  2758. +    no username map
  2759. +
  2760. +.B Example
  2761. +    username map = /usr/local/samba/lib/users.map
  2762. +
  2763. +.SS valid chars (S)
  2764. +
  2765. +The option allows you to specify additional characters that should be
  2766. +considered valid by the server in filenames. This is particularly
  2767. +useful for national character sets, such as adding u-umlaut or a-ring.
  2768. +
  2769. +The option takes a list of characters in either integer or character
  2770. +form with spaces between them. If you give two characters with a colon
  2771. +between them then it will be taken as an lowercase:uppercase pair.
  2772. +
  2773. +If you have an editor capable of entering the characters into the
  2774. +config file then it is probably easiest to use this method. Otherwise
  2775. +you can specify the characters in octal, decimal or hexidecimal form
  2776. +using the usual C notation.
  2777. +
  2778. +For example to add the single character 'Z' to the charset (which is a
  2779. +pointless thing to do as it's already there) you could do one of the
  2780. +following
  2781. +
  2782. +valid chars = Z
  2783. +valid chars = z:Z
  2784. +valid chars = 0132:0172
  2785. +
  2786. +The last two examples above actually add two characters, and alters
  2787. +the uppercase and lowercase mappings appropriately.
  2788. +
  2789. +.B Default
  2790. +    Samba defaults to using a reasonable set of valid characters
  2791. +    for english systems
  2792. +
  2793. +.B Example
  2794. +        valid chars = 0345:0305 0366:0326 0344:0304
  2795. +
  2796. +The above example allows filenames to have the swedish characters in
  2797. +them. 
  2798. +
  2799. +.SS valid users (S)
  2800. +This is a list of users that should be allowed to login to this
  2801. +service. A name starting with @ is interpreted as a unix group.
  2802. +
  2803. +If this is empty (the default) then any user can login. If a username
  2804. +is in both this list and the "invalid users" list then access is
  2805. +denied for that user.
  2806. +
  2807. +The current servicename is substituted for %S. This is useful in the
  2808. +[homes] section.
  2809. +
  2810. +See also "invalid users"
  2811. +
  2812. +.B Default
  2813. +    No valid users list. (anyone can login)
  2814. +
  2815. +.B Example
  2816. +    valid users = greg, @pcusers
  2817. +
  2818. +.SS volume (S)
  2819. +This allows you to override the volume label returned for a
  2820. +share. Useful for CDROMs whos installation programs insist on a
  2821. +particular volume label.
  2822. +
  2823. +The default is the name of the share
  2824. +
  2825. +.SS wide links (S)
  2826. +This parameter controls whether or not links in the Unix file system may be
  2827. +followed by the server. Links that point to areas within the directory tree
  2828. +exported by the server are always allowed; this parameter controls access 
  2829. +only to areas that are outside the directory tree being exported.
  2830. +
  2831. +.B Default:
  2832. +     wide links = yes
  2833. +
  2834. +.B Example:
  2835. +     wide links = no
  2836. +
  2837. +.SS workgroup (G)
  2838. +
  2839. +This controls what workgroup your server will appear to be in when
  2840. +queried by clients. This can be different to the workgroup specified
  2841. +in the nmbd configuration, but it is probably best if you set them to
  2842. +the same value.
  2843. +
  2844. +.B Default:
  2845. +     set in the Makefile
  2846. +
  2847. +.B Example:
  2848. +     workgroup = MYGROUP
  2849. +
  2850. +.SS write ok (S)
  2851. +See
  2852. +.B writable
  2853. +and
  2854. +.B read only.
  2855. +.SS writable (S)
  2856. +A synonym for this parameter is 'write ok'. An inverted synonym is 'read only'.
  2857. +
  2858. +If this parameter is 'no', then users of a service may not create or modify
  2859. +files in the service's directory.
  2860. +
  2861. +Note that a printable service ('printable = yes') will ALWAYS allow 
  2862. +writing to the directory (user privileges permitting), but only via
  2863. +spooling operations.
  2864. +
  2865. +.B Default:
  2866. +     writable = no
  2867. +
  2868. +.B Examples:
  2869. +     read only = no
  2870. +     writable = yes
  2871. +     write ok = yes
  2872. +.SS write list (S)
  2873. +This is a list of users that are given read-write access to a
  2874. +service. If the connecting user is in this list then they will be
  2875. +given write access, no matter what the "read only" option is set
  2876. +to. The list can include group names using the @group syntax.
  2877. +
  2878. +Note that if a user is in both the read list and the write list then
  2879. +they will be given write access.
  2880. +
  2881. +See also the "read list" option
  2882. +
  2883. +.B Default:
  2884. +     write list =
  2885. +
  2886. +.B Example:
  2887. +     write list = admin, root, @staff
  2888. +
  2889. +.SS write raw (G)
  2890. +This parameter controls whether or not the server will support raw writes when
  2891. +transferring data from clients.
  2892. +
  2893. +.B Default:
  2894. +     write raw = yes
  2895. +
  2896. +.B Example:
  2897. +     write raw = no
  2898. +.SH NOTE ABOUT USERNAME/PASSWORD VALIDATION
  2899. +There are a number of ways in which a user can connect to a
  2900. +service. The server follows the following steps in determining if it
  2901. +will allow a connection to a specified service. If all the steps fail
  2902. +then the connection request is rejected. If one of the steps pass then
  2903. +the following steps are not checked.
  2904. +
  2905. +If the service is marked "guest only = yes" then steps 1 to 5 are skipped
  2906. +
  2907. +Step 1: If the client has passed a username/password pair and that
  2908. +username/password pair is validated by the unix systems password
  2909. +programs then the connection is made as that username. Note that this
  2910. +includes the \\\\server\\service%username method of passing a username.
  2911. +
  2912. +Step 2: If the client has previously registered a username with the
  2913. +system and now supplies a correct password for that username then the
  2914. +connection is allowed.
  2915. +
  2916. +Step 3: The clients netbios name and any previously used user names
  2917. +are checked against the supplied password, if they match then the
  2918. +connection is allowed as the corresponding user.
  2919. +
  2920. +Step 4: If the client has previously validated a username/password
  2921. +pair with the server and the client has passed the validation token
  2922. +then that username is used. This step is skipped if "revalidate = yes" 
  2923. +for this service.
  2924. +
  2925. +Step 5: If a "user = " field is given in the smb.conf file for the
  2926. +service and the client has supplied a password, and that password
  2927. +matches (according to the unix systems password checking) with one of
  2928. +the usernames from the user= field then the connection is made as the
  2929. +username in the "user=" line. If one of the username in the user= list
  2930. +begins with a @ then that name expands to a list of names in the group
  2931. +of the same name.
  2932. +
  2933. +Step 6: If the service is a guest service then a connection is made as
  2934. +the username given in the "guest account =" for the service,
  2935. +irrespective of the supplied password.
  2936. +
  2937. +
  2938. +.SH WARNINGS
  2939. +Although the configuration file permits service names to contain spaces, 
  2940. +your client software may not. Spaces will be ignored in comparisons anyway,
  2941. +so it shouldn't be a problem - but be aware of the possibility.
  2942. +
  2943. +On a similar note, many clients - especially DOS clients - limit service
  2944. +names to eight characters. Smbd has no such limitation, but attempts
  2945. +to connect from such clients will fail if they truncate the service names.
  2946. +For this reason you should probably keep your service names down to eight 
  2947. +characters in length.
  2948. +
  2949. +Use of the [homes] and [printers] special sections make life for an 
  2950. +administrator easy, but the various combinations of default attributes can be
  2951. +tricky. Take extreme care when designing these sections. In particular,
  2952. +ensure that the permissions on spool directories are correct.
  2953. +.SH VERSION
  2954. +This man page is (mostly) correct for version 1.9.00 of the Samba suite, plus some
  2955. +of the recent patches to it. These notes will necessarily lag behind 
  2956. +development of the software, so it is possible that your version of 
  2957. +the server has extensions or parameter semantics that differ from or are not 
  2958. +covered by this man page. Please notify these to the address below for 
  2959. +rectification.
  2960. +
  2961. +Prior to version 1.5.21 of the Samba suite, the configuration file was
  2962. +radically different (more primitive). If you are using a version earlier than
  2963. +1.8.05, it is STRONGLY recommended that you upgrade.
  2964. +.SH OPTIONS
  2965. +Not applicable.
  2966. +
  2967. +.SH FILES
  2968. +Not applicable.
  2969. +
  2970. +.SH ENVIRONMENT VARIABLES
  2971. +Not applicable.
  2972. +
  2973. +.SH SEE ALSO
  2974. +.B smbd(8),
  2975. +.B smbclient(1),
  2976. +.B nmbd(8),
  2977. +.B testparm(1), 
  2978. +.B testprns(1),
  2979. +.B lpq(1),
  2980. +.B hosts_access(5)
  2981. +.SH DIAGNOSTICS
  2982. +[This section under construction]
  2983. +
  2984. +Most diagnostics issued by the server are logged in a specified log file. The
  2985. +log file name is specified at compile time, but may be overridden on the
  2986. +smbd (see smbd(8)) command line.
  2987. +
  2988. +The number and nature of diagnostics available depends on the debug level used
  2989. +by the server. If you have problems, set the debug level to 3 and peruse the
  2990. +log files.
  2991. +
  2992. +Most messages are reasonably self-explanatory. Unfortunately, at time of
  2993. +creation of this man page the source code is still too fluid to warrant
  2994. +describing each and every diagnostic. At this stage your best bet is still
  2995. +to grep the source code and inspect the conditions that gave rise to the 
  2996. +diagnostics you are seeing.
  2997. +
  2998. +.SH BUGS
  2999. +None known.
  3000. +
  3001. +Please send bug reports, comments and so on to:
  3002. +
  3003. +.RS 3
  3004. +.B samba-bugs@anu.edu.au (Andrew Tridgell)
  3005. +
  3006. +.RS 3
  3007. +or to the mailing list
  3008. +.RE
  3009. +
  3010. +.B samba@listproc.anu.edu.au
  3011. +
  3012. +.RE
  3013. +You may also like to subscribe to the announcement channel
  3014. +
  3015. +.RS 3
  3016. +samba-announce@listproc.anu.edu.au
  3017. +.RE
  3018. +
  3019. +To subscribe to these lists send a message to
  3020. +listproc@listproc.anu.edu.au with a body of "subscribe samba Your
  3021. +Name" or "subscribe samba-announce Your Name".
  3022. +
  3023. +Errors or suggestions for improvements to the Samba man pages should be 
  3024. +mailed to:
  3025. +
  3026. +.RS 3
  3027. +.B samba-bugs@anu.edu.au (Andrew Tridgell)
  3028. +.RE
  3029. +
  3030. diff -u -r --new-file last-version/docs/smbclient.1 samba-1.9.15p4/docs/smbclient.1
  3031. --- last-version/docs/smbclient.1    Thu Jul  6 17:25:41 1995
  3032. +++ samba-1.9.15p4/docs/smbclient.1    Wed Nov 22 22:28:03 1995
  3033. @@ -970,7 +970,7 @@
  3034.  None known.
  3035.  .SH CREDITS
  3036.  The original Samba software and related utilities were created by 
  3037. -Andrew Tridgell (Andrew.Tridgell@anu.edu.au). Andrew is also the Keeper
  3038. +Andrew Tridgell (samba-bugs@anu.edu.au). Andrew is also the Keeper
  3039.  of the Source for this project.
  3040.  
  3041.  This man page written by Karl Auer (Karl.Auer@anu.edu.au)
  3042. diff -u -r --new-file last-version/docs/smbd.8 samba-1.9.15p4/docs/smbd.8
  3043. --- last-version/docs/smbd.8    Mon Mar 13 22:11:31 1995
  3044. +++ samba-1.9.15p4/docs/smbd.8    Wed Nov 22 22:28:10 1995
  3045. @@ -397,7 +397,7 @@
  3046.  None known.
  3047.  .SH CREDITS
  3048.  The original Samba software and related utilities were created by 
  3049. -Andrew Tridgell (Andrew.Tridgell@anu.edu.au). Andrew is also the Keeper
  3050. +Andrew Tridgell (samba-bugs@anu.edu.au). Andrew is also the Keeper
  3051.  of the Source for this project.
  3052.  
  3053.  This man page written by Karl Auer (Karl.Auer@anu.edu.au)
  3054. diff -u -r --new-file last-version/docs/smbrun.1 samba-1.9.15p4/docs/smbrun.1
  3055. --- last-version/docs/smbrun.1    Tue Jan 17 20:19:55 1995
  3056. +++ samba-1.9.15p4/docs/smbrun.1    Wed Nov 22 22:28:16 1995
  3057. @@ -60,7 +60,7 @@
  3058.  None known.
  3059.  .SH CREDITS
  3060.  The original Samba software and related utilities were created by 
  3061. -Andrew Tridgell (Andrew.Tridgell@anu.edu.au). Andrew is also the Keeper
  3062. +Andrew Tridgell (samba-bugs@anu.edu.au). Andrew is also the Keeper
  3063.  of the Source for this project.
  3064.  
  3065.  This man page was written by Karl Auer (Karl.Auer@anu.edu.au)
  3066. diff -u -r --new-file last-version/docs/smbtar.1 samba-1.9.15p4/docs/smbtar.1
  3067. --- last-version/docs/smbtar.1    Thu Jun 29 17:37:34 1995
  3068. +++ samba-1.9.15p4/docs/smbtar.1    Wed Nov 22 22:28:22 1995
  3069. @@ -130,7 +130,7 @@
  3070.  
  3071.  .SH CREDITS
  3072.  The original Samba software and related utilities were created by 
  3073. -Andrew Tridgell (Andrew.Tridgell@anu.edu.au). Andrew is also the Keeper
  3074. +Andrew Tridgell (samba-bugs@anu.edu.au). Andrew is also the Keeper
  3075.  of the Source for this project.
  3076.  
  3077.  Ricky Poulten (poultenr@logica.co.uk) wrote the tar extension and this
  3078. diff -u -r --new-file last-version/docs/testparm.1 samba-1.9.15p4/docs/testparm.1
  3079. --- last-version/docs/testparm.1    Mon Mar 20 13:31:47 1995
  3080. +++ samba-1.9.15p4/docs/testparm.1    Wed Nov 22 22:28:28 1995
  3081. @@ -93,7 +93,7 @@
  3082.  None known.
  3083.  .SH CREDITS
  3084.  The original Samba software and related utilities were created by 
  3085. -Andrew Tridgell (Andrew.Tridgell@anu.edu.au). Andrew is also the Keeper
  3086. +Andrew Tridgell (samba-bugs@anu.edu.au). Andrew is also the Keeper
  3087.  of the Source for this project.
  3088.  
  3089.  The testparm program and this man page were written by Karl Auer
  3090. diff -u -r --new-file last-version/docs/testprns.1 samba-1.9.15p4/docs/testprns.1
  3091. --- last-version/docs/testprns.1    Sat Mar 18 21:33:13 1995
  3092. +++ samba-1.9.15p4/docs/testprns.1    Wed Nov 22 22:28:34 1995
  3093. @@ -96,7 +96,7 @@
  3094.  None known.
  3095.  .SH CREDITS
  3096.  The original Samba software and related utilities were created by 
  3097. -Andrew Tridgell (Andrew.Tridgell@anu.edu.au). Andrew is also the Keeper
  3098. +Andrew Tridgell (samba-bugs@anu.edu.au). Andrew is also the Keeper
  3099.  of the Source for this project.
  3100.  
  3101.  The testprns program and this man page were written by Karl Auer
  3102. diff -u -r --new-file last-version/source/Makefile samba-1.9.15p4/source/Makefile
  3103. --- last-version/source/Makefile    Wed Nov 22 17:50:54 1995
  3104. +++ samba-1.9.15p4/source/Makefile    Fri Nov 24 00:42:24 1995
  3105. @@ -23,6 +23,7 @@
  3106.  INSTALLPERMS = 0755
  3107.  
  3108.  # Add any optimisation or debugging flags here
  3109. +# add -DSYSLOG for syslog support
  3110.  FLAGS1 = -O
  3111.  LIBS1 = 
  3112.  
  3113. @@ -425,7 +426,7 @@
  3114.  LIBS = $(LIBS1) $(LIBSM) $(DCE_LIBS) $(DES_LIB)
  3115.  
  3116.  PROGS1 = smbd smbclient nmbd testparm testprns smbrun smbstatus smbpasswd 
  3117. -PROGS = $(PROGS1) nmblookup
  3118. +PROGS = $(PROGS1) nmblookup addtosmbpass
  3119.  SCRIPTS = smbtar
  3120.  
  3121.  all : CHECK $(PROGS)
  3122. @@ -440,9 +441,8 @@
  3123.  INCLUDES = $(INCLUDES1) $(INCLUDES2)
  3124.  
  3125.  UTILOBJ1 = util.o system.o charset.o kanji.o fault.o smbencrypt.o charcnv.o
  3126. -UTILOBJ = $(UTILOBJ1) md4.o
  3127. -PARAMOBJ1 = $(UTILOBJ) loadparm.o params.o pcap.o access.o username.o
  3128. -PARAMOBJ = $(PARAMOBJ1) ufc.o smbpass.o 
  3129. +UTILOBJ = $(UTILOBJ1) md4.o loadparm.o params.o pcap.o username.o
  3130. +PARAMOBJ = $(UTILOBJ) ufc.o smbpass.o access.o 
  3131.  SMBDOBJ1 = $(PARAMOBJ) trans2.o message.o dir.o printing.o locking.o
  3132.  SMBDOBJ2 = ipc.o reply.o mangle.o chgpasswd.o password.o
  3133.  SMBDOBJ = $(SMBDOBJ1) $(SMBDOBJ2) $(VTP_OBJ)
  3134. diff -u -r --new-file last-version/source/addtosmbpass samba-1.9.15p4/source/addtosmbpass
  3135. --- last-version/source/addtosmbpass    Thu Jan  1 10:00:00 1970
  3136. +++ samba-1.9.15p4/source/addtosmbpass    Fri Nov 24 00:41:08 1995
  3137. @@ -0,0 +1,74 @@
  3138. +#!/usr/bin/awk -f
  3139. +# edit the line above to point to your real location of awk interpreter
  3140. +
  3141. +# awk program for adding new entries in smbpasswd files
  3142. +# arguments are account names to add; feed it an existent Samba password
  3143. +# file on stdin, results will be written on stdout
  3144. +#
  3145. +# Michal Jaegermann, michal@ellpspace.math.ualberta.ca, 1995-11-09
  3146. +
  3147. +BEGIN {
  3148. +  me = "addtosmbpass";
  3149. +  count = ARGC;
  3150. +  FS = ":";
  3151. +  if (count == 1) {
  3152. +    print "Usage:", me,
  3153. +          "name1 [name2 ....] < smbpasswd.in >  smbpasswd.out";
  3154. +    ARGV[1] = "/dev/null";
  3155. +    ARGC = 2;
  3156. +    exit;
  3157. +  }
  3158. +
  3159. +  for(i = 1; i < count; i++) {
  3160. +    names[ARGV[i]] = " ";
  3161. +    delete ARGV[i];
  3162. +  }
  3163. +# sane awk should work simply with 'ARGC = 1', but not every awk
  3164. +# implementation is sane - big sigh!!
  3165. +  ARGV[1] = "-";
  3166. +  ARGC = 2;
  3167. +#
  3168. +# If you have ypmatch but is not RPC registered (some Linux systems
  3169. +# for example) comment out the next line.
  3170. +# "which ypmatch" | getline ypmatch;
  3171. +  if (1 != match(ypmatch, /^\//)) {
  3172. +    ypmatch = "";
  3173. +  }
  3174. +  pwdf = "/etc/passwd";
  3175. +}
  3176. +#check for names already present in input
  3177. +{
  3178. +  print $0;
  3179. +  for(name in names) {
  3180. +    if($1 ~ name) {
  3181. +      delete names[name];
  3182. +    }
  3183. +  }
  3184. +}
  3185. +END {
  3186. +  fmt = "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:";
  3187. +  fmt = fmt   "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:%s:%s:%s\n";
  3188. +  for(name in names) {
  3189. +    while ((getline < pwdf) > 0) {
  3190. +      if ($1 == name) {
  3191. +    printf(fmt, $1, $3, $5, $6, $7);
  3192. +    close(pwdf);
  3193. +    notfound = "";
  3194. +    break;
  3195. +      }
  3196. +      notfound = "n";
  3197. +    }
  3198. +    $0 = "";
  3199. +    if (notfound && ypmatch) {
  3200. +#     try to find in NIS databases
  3201. +      command = ypmatch " " name " passwd";
  3202. +      command | getline;
  3203. +      if (NF > 0) {
  3204. +    printf(fmt, $1, $3, $5, $6, $7);
  3205. +      }
  3206. +      close(command);
  3207. +    }
  3208. +  }
  3209. +}
  3210. +
  3211. diff -u -r --new-file last-version/source/change-log samba-1.9.15p4/source/change-log
  3212. --- last-version/source/change-log    Wed Nov 22 22:04:02 1995
  3213. +++ samba-1.9.15p4/source/change-log    Fri Nov 24 23:20:15 1995
  3214. @@ -1688,10 +1688,30 @@
  3215.      - fixed problem in smbmv that led to ar not working in mks
  3216.      - added transs2
  3217.      - released p3
  3218. +    - updated email addresses
  3219. +    - fix for innetgr from Olaf Seibert (rhialto@polder.ubc.kun.nl)
  3220. +    - client translate fix from bandc@dircon.co.uk
  3221. +    - netbsd bcast fix from from Olaf Seibert (rhialto@polder.ubc.kun.nl)
  3222. +    - syslog code from Alex Nash <alex@fa.tca.com>
  3223. +    - strip dot fix from Arne Ansper <arne@ioc.ee>
  3224. +    - added addtosmbpass + man page from 
  3225. +    michal@ellpspace.math.ualberta.ca (Michal Jaegermann)
  3226. +    - pcap fix for AIX from Jon Christiansen <jchristi@sctcorp.com>
  3227. +    - fixed servertype bug in remote announcements
  3228. +    - fixed up illegal name checks (should also be faster)
  3229. +    - kanji patches from fujita@ainix.isac.co.jp (Takashi Fujita)
  3230. +    - fixed bug handling non-encrypted passwords
  3231. +    - released p4
  3232.  
  3233.  
  3234.  ==========
  3235.  todo:
  3236. +
  3237. +hosts allow in nmbd
  3238. +
  3239. +hosts allow cache
  3240. +
  3241. +add password command in smbclient
  3242.  
  3243.  drag long filename to samba under os/2 gives short name
  3244.  
  3245. diff -u -r --new-file last-version/source/client.c samba-1.9.15p4/source/client.c
  3246. --- last-version/source/client.c    Wed Nov 22 20:43:21 1995
  3247. +++ samba-1.9.15p4/source/client.c    Thu Nov 23 11:13:47 1995
  3248. @@ -19,6 +19,10 @@
  3249.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  3250.  */
  3251.  
  3252. +#ifdef SYSLOG
  3253. +#undef SYSLOG
  3254. +#endif
  3255. +
  3256.  #include "includes.h"
  3257.  
  3258.  #ifndef REGISTER
  3259. @@ -211,6 +215,7 @@
  3260.        if (c == '\n') /* change all LFs to CR/LF */
  3261.      {
  3262.        b[i++] = '\r';
  3263. +      n++;
  3264.      }
  3265.        
  3266.        b[i++] = c;
  3267. @@ -1472,7 +1477,7 @@
  3268.      get_total_size += finfo.size;
  3269.  
  3270.      DEBUG(2,("(%g kb/s) (average %g kb/s)\n",
  3271. -         finfo.size / (1.024*this_time),
  3272. +         finfo.size / (1.024*this_time + 1.0e-4),
  3273.           get_total_size / (1.024*get_total_time_ms)));
  3274.    }
  3275.  
  3276. @@ -1973,7 +1978,7 @@
  3277.      put_total_size += finfo->size;
  3278.  
  3279.      DEBUG(2,("(%g kb/s) (average %g kb/s)\n",
  3280. -         finfo->size / (1.024*this_time),
  3281. +         finfo->size / (1.024*this_time + 1.0e-4),
  3282.           put_total_size / (1.024*put_total_time_ms)));
  3283.    }
  3284.  } 
  3285. diff -u -r --new-file last-version/source/clitar.c samba-1.9.15p4/source/clitar.c
  3286. --- last-version/source/clitar.c    Wed Nov 22 15:05:30 1995
  3287. +++ samba-1.9.15p4/source/clitar.c    Thu Nov 23 10:07:28 1995
  3288. @@ -729,7 +729,7 @@
  3289.        get_total_size += finfo.size;
  3290.        
  3291.        DEBUG(2,("(%g kb/s) (average %g kb/s)\n",
  3292. -           finfo.size / (1.024*this_time),
  3293. +           finfo.size / (1.024*this_time + 1.0e-4),
  3294.             get_total_size / (1.024*get_total_time_ms)));
  3295.      }
  3296.    
  3297. diff -u -r --new-file last-version/source/includes.h samba-1.9.15p4/source/includes.h
  3298. --- last-version/source/includes.h    Wed Nov 22 21:55:27 1995
  3299. +++ samba-1.9.15p4/source/includes.h    Thu Nov 23 11:03:29 1995
  3300. @@ -179,6 +179,10 @@
  3301.  #endif
  3302.  #endif
  3303.  
  3304. +#ifdef SYSLOG
  3305. +#include <syslog.h>
  3306. +#endif
  3307. +
  3308.  
  3309.  
  3310.  /***************************************************************************
  3311. @@ -420,6 +424,7 @@
  3312.  #define NO_GETSPNAM
  3313.  #define SIGNAL_CAST (void (*)())
  3314.  #define USE_DIRECT
  3315. +#define REPLACE_INNETGR
  3316.  #endif 
  3317.  
  3318.  
  3319. @@ -431,6 +436,7 @@
  3320.  #include <netinet/ip.h>
  3321.  #define SIGNAL_CAST (void (*)())
  3322.  #define USE_DIRECT
  3323. +#define REPLACE_INNETGR
  3324.  #endif 
  3325.  
  3326.  
  3327. @@ -762,6 +768,10 @@
  3328.  #ifdef REPLACE_GETPASS
  3329.  extern char    *getsmbpass(char *);
  3330.  #define getpass(s) getsmbpass(s)
  3331. +#endif
  3332. +
  3333. +#ifdef REPLACE_INNETGR
  3334. +#define innetgr(group,host,user,dom) InNetGr(group,host,user,dom)
  3335.  #endif
  3336.  
  3337.  #ifndef FD_SETSIZE
  3338. diff -u -r --new-file last-version/source/ipc.c samba-1.9.15p4/source/ipc.c
  3339. --- last-version/source/ipc.c    Wed Nov 22 21:08:05 1995
  3340. +++ samba-1.9.15p4/source/ipc.c    Thu Nov 23 14:28:05 1995
  3341. @@ -1581,10 +1581,14 @@
  3342.        SCVAL(p,0,2);        /* version_major */
  3343.        SCVAL(p,1,0);        /* version_minor */
  3344.        SIVAL(p,2,servertype);
  3345. -      SIVAL(p,6,PTR_DIFF(p2,*rdata));
  3346. -      standard_sub(cnum,comment);
  3347. -      StrnCpy(p2,comment,MAX(mdrcnt - struct_len,0));
  3348. -      p2 = skip_string(p2,1);
  3349. +      if (mdrcnt == struct_len) {
  3350. +    SIVAL(p,6,0);
  3351. +      } else {
  3352. +    SIVAL(p,6,PTR_DIFF(p2,*rdata));
  3353. +    standard_sub(cnum,comment);
  3354. +    StrnCpy(p2,comment,MAX(mdrcnt - struct_len,0));
  3355. +    p2 = skip_string(p2,1);
  3356. +      }
  3357.      }
  3358.    if (uLevel > 1)
  3359.      {
  3360. @@ -1802,6 +1806,57 @@
  3361.    return(True);
  3362.  }
  3363.  
  3364. +
  3365. +/*******************************************************************
  3366. +  get groups that a user is a member of
  3367. +  ******************************************************************/
  3368. +static BOOL api_NetUserGetGroups(int cnum,int uid, char *param,char *data,
  3369. +                 int mdrcnt,int mprcnt,
  3370. +                 char **rdata,char **rparam,
  3371. +                 int *rdata_len,int *rparam_len)
  3372. +{
  3373. +  char *str1 = param+2;
  3374. +  char *str2 = skip_string(str1,1);
  3375. +  char *UserName = skip_string(str2,1);
  3376. +  char *p = skip_string(UserName,1);
  3377. +  int uLevel = SVAL(p,0);
  3378. +  char *p2;
  3379. +  int count=0;
  3380. +
  3381. +  *rparam_len = 8;
  3382. +  *rparam = REALLOC(*rparam,*rparam_len);
  3383. +
  3384. +  /* check it's a supported varient */
  3385. +  if (strcmp(str1,"zWrLeh") != 0) return False;
  3386. +  switch( uLevel ) {
  3387. +  case 0: p2 = "B21"; break;
  3388. +  default: return False;
  3389. +  }
  3390. +  if (strcmp(p2,str2) != 0) return False;
  3391. +
  3392. +  *rdata_len = mdrcnt + 1024;
  3393. +  *rdata = REALLOC(*rdata,*rdata_len);
  3394. +
  3395. +  SSVAL(*rparam,0,NERR_Success);
  3396. +  SSVAL(*rparam,2,0);        /* converter word */
  3397. +
  3398. +  p = *rdata;
  3399. +
  3400. +  /* XXXX we need a real SAM database some day */
  3401. +  strcpy(p,"Users"); p += 21; count++;
  3402. +  strcpy(p,"Domain Users"); p += 21; count++;
  3403. +  strcpy(p,"Guests"); p += 21; count++;
  3404. +  strcpy(p,"Domain Guests"); p += 21; count++;
  3405. +
  3406. +  *rdata_len = PTR_DIFF(p,*rdata);
  3407. +
  3408. +  SSVAL(*rparam,4,count);    /* is this right?? */
  3409. +  SSVAL(*rparam,6,count);    /* is this right?? */
  3410. +
  3411. +  return(True);
  3412. +}
  3413. +
  3414. +
  3415.  static BOOL api_WWkstaUserLogon(int cnum,int uid, char *param,char *data,
  3416.                  int mdrcnt,int mprcnt,
  3417.                  char **rdata,char **rparam,
  3418. @@ -2389,6 +2444,7 @@
  3419.    {"RNetShareGetInfo",    1,    api_RNetShareGetInfo,0},
  3420.    {"RNetServerGetInfo",    13,    api_RNetServerGetInfo,0},
  3421.    {"RNetUserGetInfo",    56,    api_RNetUserGetInfo,0},
  3422. +  {"NetUserGetGroups",    59,    api_NetUserGetGroups,0},
  3423.    {"NetWkstaGetInfo",    63,    api_NetWkstaGetInfo,0},
  3424.    {"DosPrintQEnum",    69,    api_DosPrintQEnum,0},
  3425.    {"DosPrintQGetInfo",    70,    api_DosPrintQGetInfo,0},
  3426. diff -u -r --new-file last-version/source/kanji.c samba-1.9.15p4/source/kanji.c
  3427. --- last-version/source/kanji.c    Fri Sep 15 20:17:44 1995
  3428. +++ samba-1.9.15p4/source/kanji.c    Fri Nov 24 14:43:02 1995
  3429. @@ -199,7 +199,7 @@
  3430.      }
  3431.      *out = 0;
  3432.      if (overwrite) {
  3433. -    strcpy((char *) save, (const char *) cvtbuf);
  3434. +    strcpy((char *) save, (char *) cvtbuf);
  3435.      return (char *) save;
  3436.      } else {
  3437.      return cvtbuf;
  3438. @@ -232,7 +232,7 @@
  3439.      }
  3440.      *out = 0;
  3441.      if (overwrite) {
  3442. -    strcpy(save, (const char *) cvtbuf);
  3443. +    strcpy(save, (char *) cvtbuf);
  3444.      return save;
  3445.      } else {
  3446.      return cvtbuf;
  3447. @@ -306,7 +306,7 @@
  3448.      }
  3449.      *out = 0;
  3450.      if (overwrite) {
  3451. -    strcpy (save, (const char *) cvtbuf);
  3452. +    strcpy (save, (char *) cvtbuf);
  3453.      return save;
  3454.      } else {
  3455.      return cvtbuf;
  3456. @@ -363,7 +363,7 @@
  3457.      }
  3458.      *out = 0;
  3459.      if (overwrite) {
  3460. -    strcpy (save, (const char *) cvtbuf);
  3461. +    strcpy (save, (char *) cvtbuf);
  3462.      return save;
  3463.      } else {
  3464.      return cvtbuf;
  3465. @@ -423,7 +423,7 @@
  3466.      }
  3467.      *out = 0;
  3468.      if (overwrite) {
  3469. -    strcpy (save, (const char *) cvtbuf);
  3470. +    strcpy (save, (char *) cvtbuf);
  3471.      return save;
  3472.      } else {
  3473.      return cvtbuf;
  3474. @@ -500,7 +500,7 @@
  3475.      }
  3476.      *out = 0;
  3477.      if (overwrite) {
  3478. -    strcpy (save, (const char *) cvtbuf);
  3479. +    strcpy (save, (char *) cvtbuf);
  3480.      return save;
  3481.      } else {
  3482.      return cvtbuf;
  3483. @@ -557,7 +557,7 @@
  3484.      }
  3485.      *out = 0;
  3486.      if (overwrite) {
  3487. -    strcpy (save, (const char *) cvtbuf);
  3488. +    strcpy (save, (char *) cvtbuf);
  3489.      return save;
  3490.      } else {
  3491.      return cvtbuf;
  3492. @@ -627,7 +627,7 @@
  3493.      }
  3494.      *out = 0;
  3495.      if (overwrite) {
  3496. -    strcpy (save, (const char *) cvtbuf);
  3497. +    strcpy (save, (char *) cvtbuf);
  3498.      return save;
  3499.      } else {
  3500.      return cvtbuf;
  3501. @@ -654,7 +654,7 @@
  3502.      }
  3503.      *dp = '\0';
  3504.      if (overwrite) {
  3505. -    strcpy ((char *) from, (const char *) cvtbuf);
  3506. +    strcpy ((char *) from, (char *) cvtbuf);
  3507.      return (char *) from;
  3508.      } else {
  3509.      return cvtbuf;
  3510. @@ -691,7 +691,7 @@
  3511.      }
  3512.      *dp = '\0';
  3513.      if (overwrite) {
  3514. -    strcpy ((char *) from, (const char *) cvtbuf);
  3515. +    strcpy ((char *) from, (char *) cvtbuf);
  3516.      return (char *) from;
  3517.      } else {
  3518.      return cvtbuf;
  3519. @@ -699,13 +699,42 @@
  3520.  }
  3521.  
  3522.  /*******************************************************************
  3523. +  kanji/kana -> ":xx" 
  3524. +********************************************************************/
  3525. +static char *
  3526. +sj_to_cap (const char *from, BOOL overwrite)
  3527. +{
  3528. +    unsigned char *sp, *dp;
  3529. +
  3530. +    sp = (unsigned char*) from;
  3531. +    dp = (unsigned char*) cvtbuf;
  3532. +    while (*sp) {
  3533. +    if (*sp >= 0x80) {
  3534. +        *dp++ = hex_tag;
  3535. +        *dp++ = bin2hex (((*sp)>>4)&0x0f);
  3536. +        *dp++ = bin2hex ((*sp)&0x0f);
  3537. +        sp++;
  3538. +    } else {
  3539. +        *dp++ = *sp++;
  3540. +    }
  3541. +    }
  3542. +    *dp = '\0';
  3543. +    if (overwrite) {
  3544. +    strcpy ((char *) from, (char *) cvtbuf);
  3545. +    return (char *) from;
  3546. +    } else {
  3547. +    return cvtbuf;
  3548. +    }
  3549. +}
  3550. +
  3551. +/*******************************************************************
  3552.   sj to sj
  3553.  ********************************************************************/
  3554.  static char *
  3555.  sj_to_sj (const char *from, BOOL overwrite)
  3556.  {
  3557.      if (!overwrite) {
  3558. -    strcpy (cvtbuf, (const char *) from);
  3559. +    strcpy (cvtbuf, (char *) from);
  3560.      return cvtbuf;
  3561.      } else {
  3562.      return (char *) from;
  3563. @@ -755,6 +784,11 @@
  3564.      _dos_to_unix = sj_to_hex;
  3565.      _unix_to_dos = hex_to_sj;
  3566.      break;
  3567. +
  3568. +    case CAP_CODE:
  3569. +    _dos_to_unix = sj_to_cap;
  3570. +    _unix_to_dos = hex_to_sj;
  3571. +    break;
  3572.      }
  3573.      return codes;
  3574.  }
  3575. @@ -771,6 +805,9 @@
  3576.      codes = SJIS_CODE;
  3577.      } else if (strequal (str, "euc")) {
  3578.      codes = EUC_CODE;
  3579. +    } else if (strequal (str, "cap")) {
  3580. +    codes = CAP_CODE;
  3581. +    hex_tag = HEXTAG;
  3582.      } else if (strequal (str, "hex")) {
  3583.      codes = HEX_CODE;
  3584.      hex_tag = HEXTAG;
  3585. diff -u -r --new-file last-version/source/kanji.h samba-1.9.15p4/source/kanji.h
  3586. --- last-version/source/kanji.h    Tue Nov  7 11:03:48 1995
  3587. +++ samba-1.9.15p4/source/kanji.h    Fri Nov 24 14:43:02 1995
  3588. @@ -115,6 +115,7 @@
  3589.  #define JIS8_CODE (3)
  3590.  #define JUNET_CODE (4)
  3591.  #define HEX_CODE (5)
  3592. +#define CAP_CODE (6)
  3593.  #define DOSV_CODE SJIS_CODE
  3594.  
  3595.  int interpret_coding_system (char *str, int def);
  3596. diff -u -r --new-file last-version/source/loadparm.c samba-1.9.15p4/source/loadparm.c
  3597. --- last-version/source/loadparm.c    Wed Nov 22 18:00:55 1995
  3598. +++ samba-1.9.15p4/source/loadparm.c    Thu Nov 23 13:35:22 1995
  3599. @@ -143,6 +143,7 @@
  3600.     int printing;
  3601.     int maxdisksize;
  3602.     int lpqcachetime;
  3603. +   int syslog;
  3604.     int os_level;
  3605.     int max_ttl;
  3606.     BOOL bPreferredMaster;
  3607. @@ -156,6 +157,7 @@
  3608.     BOOL bWriteRaw;
  3609.     BOOL bReadPrediction;
  3610.     BOOL bReadbmpx;
  3611. +   BOOL bSyslogOnly;
  3612.  } global;
  3613.  
  3614.  static global Globals;
  3615. @@ -341,6 +343,8 @@
  3616.  {
  3617.    {"debuglevel",       P_INTEGER, P_GLOBAL, &DEBUGLEVEL,                NULL},
  3618.    {"log level",        P_INTEGER, P_GLOBAL, &DEBUGLEVEL,                NULL},
  3619. +  {"syslog",           P_INTEGER, P_GLOBAL, &Globals.syslog,            NULL},
  3620. +  {"syslog only",      P_BOOL,    P_GLOBAL, &Globals.bSyslogOnly,       NULL},
  3621.    {"protocol",         P_INTEGER, P_GLOBAL, &Globals.maxprotocol,handle_protocol},
  3622.    {"security",         P_INTEGER, P_GLOBAL, &Globals.security,handle_security},
  3623.    {"printing",         P_INTEGER, P_GLOBAL, &Globals.printing,handle_printing},
  3624. @@ -401,6 +405,7 @@
  3625.    {"os level",         P_INTEGER, P_GLOBAL, &Globals.os_level,          NULL},
  3626.    {"max ttl",          P_INTEGER, P_GLOBAL, &Globals.max_ttl,           NULL},
  3627.    {"preferred master", P_BOOL,    P_GLOBAL, &Globals.bPreferredMaster,  NULL},
  3628. +  {"prefered master",  P_BOOL,    P_GLOBAL, &Globals.bPreferredMaster,  NULL},
  3629.    {"domain master",    P_BOOL,    P_GLOBAL, &Globals.bDomainMaster,     NULL},
  3630.  
  3631.    {"-valid",           P_BOOL,    P_LOCAL,  &sDefault.valid,            NULL},
  3632. @@ -545,6 +550,8 @@
  3633.    Globals.bReadbmpx = True;
  3634.    Globals.bNullPasswords = False;
  3635.    Globals.bStripDot = False;
  3636. +  Globals.syslog = 1;
  3637. +  Globals.bSyslogOnly = False;
  3638.    Globals.os_level = 0;
  3639.    Globals.max_ttl = 60*60*4; /* 2 hours default */
  3640.    Globals.bPreferredMaster = True;
  3641. @@ -670,8 +677,8 @@
  3642.  FN_GLOBAL_BOOL(lp_null_passwords,&Globals.bNullPasswords)
  3643.  FN_GLOBAL_BOOL(lp_strip_dot,&Globals.bStripDot)
  3644.  FN_GLOBAL_BOOL(lp_encrypted_passwords,&Globals.bEncryptPasswords)
  3645. +FN_GLOBAL_BOOL(lp_syslog_only,&Globals.bSyslogOnly)
  3646.  
  3647. -
  3648.  FN_GLOBAL_INTEGER(lp_os_level,&Globals.os_level)
  3649.  FN_GLOBAL_INTEGER(lp_max_ttl,&Globals.max_ttl)
  3650.  FN_GLOBAL_INTEGER(lp_max_log_size,&Globals.max_log_size)
  3651. @@ -687,6 +694,7 @@
  3652.  FN_GLOBAL_INTEGER(lp_printing,&Globals.printing)
  3653.  FN_GLOBAL_INTEGER(lp_maxdisksize,&Globals.maxdisksize)
  3654.  FN_GLOBAL_INTEGER(lp_lpqcachetime,&Globals.lpqcachetime)
  3655. +FN_GLOBAL_INTEGER(lp_syslog,&Globals.syslog)
  3656.  
  3657.  FN_LOCAL_STRING(lp_preexec,szPreExec)
  3658.  FN_LOCAL_STRING(lp_postexec,szPostExec)
  3659. @@ -1542,7 +1550,7 @@
  3660.     /* check for multiple global sections */
  3661.     if (bInGlobalSection)
  3662.     {
  3663. -     DEBUG(2,( "Processing section \"[%s]\"\n", pszSectionName));
  3664. +     DEBUG(3,( "Processing section \"[%s]\"\n", pszSectionName));
  3665.       return(True);
  3666.     }
  3667.  
  3668. diff -u -r --new-file last-version/source/loadparm.h samba-1.9.15p4/source/loadparm.h
  3669. --- last-version/source/loadparm.h    Wed Nov 22 18:01:21 1995
  3670. +++ samba-1.9.15p4/source/loadparm.h    Thu Nov 23 11:18:52 1995
  3671. @@ -75,6 +75,7 @@
  3672.  extern BOOL lp_null_passwords(void);
  3673.  extern BOOL lp_strip_dot(void);
  3674.  extern BOOL lp_encrypted_passwords(void);
  3675. +extern BOOL lp_syslog_only(void);
  3676.  extern int  lp_numservices(void);
  3677.  extern int  lp_keepalive(void);
  3678.  extern int  lp_passwordlevel(void);
  3679. @@ -82,6 +83,7 @@
  3680.  extern int  lp_printing(void);
  3681.  extern int  lp_maxdisksize(void);
  3682.  extern int  lp_lpqcachetime(void);
  3683. +extern int  lp_syslog(void);
  3684.  extern int  lp_deadtime(void);
  3685.  extern int  lp_debuglevel(void);
  3686.  extern int  lp_maxprotocol(void);
  3687. diff -u -r --new-file last-version/source/mangle.c samba-1.9.15p4/source/mangle.c
  3688. --- last-version/source/mangle.c    Tue Nov  7 12:33:19 1995
  3689. +++ samba-1.9.15p4/source/mangle.c    Fri Nov 24 14:55:22 1995
  3690. @@ -530,11 +530,41 @@
  3691.  }
  3692.  
  3693.  
  3694. +
  3695. +/*******************************************************************
  3696. +  work out if a name is illegal, even for long names
  3697. +  ******************************************************************/
  3698. +static BOOL illegal_name(char *name)
  3699. +{
  3700. +  static unsigned char illegal[256];
  3701. +  static BOOL initialised=False;
  3702. +  unsigned char *s;
  3703. +
  3704. +  if (!initialised) {
  3705. +    char *ill = "*\\/?<>|\":{}";
  3706. +    initialised = True;
  3707. +  
  3708. +    bzero((char *)illegal,256);
  3709. +    for (s = (unsigned char *)ill; *s; s++)
  3710. +      illegal[*s] = True;
  3711. +  }
  3712. +
  3713. +  for (s = (unsigned char *)name;*s;s++)
  3714. +    if (illegal[*s]) return(True);
  3715. +
  3716. +  return(False);
  3717. +}
  3718. +
  3719. +
  3720.  /****************************************************************************
  3721.  convert a filename to DOS format. return True if successful.
  3722.  ****************************************************************************/
  3723.  BOOL name_map_mangle(char *OutName,BOOL need83,int snum)
  3724.  {
  3725. +#ifdef MANGLE_LONG_FILENAMES
  3726. +  if (!need83 && illegal_name(OutName)) need83 = True;
  3727. +#endif  
  3728. +
  3729.    /* apply any name mappings */
  3730.    {
  3731.      char *map = lp_mangled_map(snum);
  3732. diff -u -r --new-file last-version/source/nameserv.c samba-1.9.15p4/source/nameserv.c
  3733. --- last-version/source/nameserv.c    Wed Nov 22 21:14:57 1995
  3734. +++ samba-1.9.15p4/source/nameserv.c    Fri Nov 24 14:28:09 1995
  3735. @@ -108,6 +108,8 @@
  3736.  
  3737.  #define MSBROWSE "\001\002__MSBROWSE__\002"
  3738.  
  3739. +#define GET_TTL(ttl) ((ttl)?MIN(ttl,lp_max_ttl()):lp_max_ttl())
  3740. +
  3741.  /****************************************************************************
  3742.  catch a sighup
  3743.  ****************************************************************************/
  3744. @@ -401,8 +403,6 @@
  3745.    BOOL newentry=False;
  3746.    struct server_record *s;
  3747.  
  3748. -  ttl = MIN(ttl,lp_max_ttl());
  3749. -
  3750.    for (s = serverlist; s; s = s->next)
  3751.      if (strequal(name,s->name)) break;
  3752.  
  3753. @@ -455,7 +455,9 @@
  3754.  
  3755.    add_host_entry(myname,0x20,True,0,SELF,ip);
  3756.    add_host_entry(myname,0x0,True,0,SELF,ip);
  3757. -  add_host_entry(myname,0x1f,True,0,SELF,ip); /* used for chat, I think */
  3758. +  add_host_entry(myname,0x1f,True,0,SELF,ip); /* used for chat?? */
  3759. +  add_host_entry(myname,0x3,True,0,SELF,ip); /* used for winpopup */
  3760. +                        
  3761.    if (!domainlist)
  3762.      add_domain_entry(lp_workgroup(),bcast_ip);
  3763.    add_server_entry(myname,
  3764. @@ -770,6 +772,7 @@
  3765.    ******************************************************************/
  3766.  static void become_master(void)
  3767.  {
  3768. +  uint32 domain_type = SV_TYPE_DOMAIN_ENUM | SV_TYPE_SERVER_UNIX;
  3769.    DEBUG(2,("Becoming master for %s\n",PrimaryGroup));
  3770.  
  3771.    ServerType |= SV_TYPE_MASTER_BROWSER;
  3772. @@ -779,15 +782,24 @@
  3773.    add_host_entry(PrimaryGroup,0x1d,True,0,SELF,myip);
  3774.    add_host_entry(PrimaryGroup,0x0,False,0,SELF,myip);
  3775.    add_host_entry(MSBROWSE,1,False,0,SELF,myip);
  3776. -  add_server_entry(PrimaryGroup,SV_TYPE_DOMAIN_ENUM,0,myname,True);
  3777. -  add_server_entry(myname,ServerType,0,ServerComment,True);
  3778.  
  3779.    if (lp_domain_master()) {
  3780. +    add_host_entry(myname,0x1b,True,0,SELF,myip);
  3781.      add_host_entry(PrimaryGroup,0x1b,True,0,SELF,myip);
  3782.      add_host_entry(PrimaryGroup,0x1c,False,0,SELF,myip);
  3783.      ServerType |= SV_TYPE_DOMAIN_MASTER;
  3784. +#if 0
  3785. +    ServerType |= SV_TYPE_DOMAIN_CTRL;
  3786. +    ServerType |= SV_TYPE_DOMAIN_MEMBER;
  3787. +    ServerType |= 0xFFFFFF;
  3788. +    domain_type |= SV_TYPE_DOMAIN_CTRL;
  3789. +    domain_type |= 0xFFFFFF;
  3790. +#endif
  3791.    }
  3792.  
  3793. +  add_server_entry(PrimaryGroup,domain_type,0,myname,True);
  3794. +  add_server_entry(myname,ServerType,0,ServerComment,True);
  3795. +
  3796.    announce_request(PrimaryGroup);
  3797.  
  3798.    needannounce = True;
  3799. @@ -861,6 +873,7 @@
  3800.    char *namep;
  3801.    char *stypep;
  3802.    char *commentp;
  3803. +  uint32 stype = ServerType;
  3804.  
  3805.    if (needannounce) {
  3806.      /* drop back to a max 3 minute announce - this is to prevent a
  3807. @@ -877,8 +890,15 @@
  3808.    if (d->announce_interval < 12*60) d->announce_interval += 60;
  3809.    d->lastannounce_time = t;
  3810.  
  3811. -  DEBUG(2,("Sending announcement to %s for workgroup %s type=%d\n",
  3812. -       inet_ntoa(d->bcast_ip),d->name));       
  3813. +  DEBUG(2,("Sending announcement to %s for workgroup %s\n",
  3814. +       inet_ntoa(d->bcast_ip),d->name));
  3815. +
  3816. +  if (!strequal(PrimaryGroup,d->name) ||
  3817. +      !ip_equal(bcast_ip,d->bcast_ip)) {
  3818. +    stype &= ~(SV_TYPE_POTENTIAL_BROWSER | SV_TYPE_MASTER_BROWSER |
  3819. +           SV_TYPE_DOMAIN_MASTER | SV_TYPE_BACKUP_BROWSER |
  3820. +           SV_TYPE_DOMAIN_CTRL | SV_TYPE_DOMAIN_MEMBER);
  3821. +  }
  3822.  
  3823.    if (!*comment) comment = "NoComment";
  3824.    if (!*my_name) my_name = "NoName";
  3825. @@ -897,7 +917,7 @@
  3826.    CVAL(p,21) = 2; /* major version */
  3827.    CVAL(p,22) = 2; /* minor version */
  3828.    stypep = p+23;
  3829. -  SIVAL(p,23,ServerType);
  3830. +  SIVAL(p,23,stype);
  3831.    SSVAL(p,27,0xaa55); /* browse signature */
  3832.    SSVAL(p,29,1); /* browse version */
  3833.    commentp = p+31;
  3834. @@ -916,6 +936,7 @@
  3835.        ip_equal(bcast_ip,d->bcast_ip)) {
  3836.  
  3837.      /* do master announcements as well */
  3838. +    SIVAL(stypep,0,ServerType);
  3839.  
  3840.      CVAL(outbuf,0) = 15; /* local master announce */
  3841.      send_udp_dgram(ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
  3842. @@ -1069,7 +1090,7 @@
  3843.  
  3844.    if (!listening(&dgram->dest_name)) return;
  3845.  
  3846. -  ttl = MIN(ttl,lp_max_ttl());
  3847. +  ttl = GET_TTL(ttl);
  3848.  
  3849.    /* add them to our browse list */
  3850.    add_server_entry(name,servertype,ttl,comment,True);
  3851. @@ -1433,7 +1454,7 @@
  3852.    char *qname = nmb->question.question_name.name;
  3853.    BOOL wildcard = (qname[0] == '*'); 
  3854.    BOOL bcast = nmb->header.nm_flags.bcast;
  3855. -  int ttl = MIN(lp_max_ttl(),nmb->additional->ttl);
  3856. +  int ttl = GET_TTL(nmb->additional->ttl);
  3857.    int name_type = nmb->question.question_name.name_type;
  3858.    int nb_flags = nmb->additional->rdata[0];
  3859.    struct packet_struct p2;
  3860. @@ -2058,6 +2079,10 @@
  3861.    StartupTime = time(NULL);
  3862.  
  3863.    TimeInit();
  3864. +
  3865. +#ifdef SYSLOG
  3866. +  openlog(argv[0], LOG_PID, LOG_DAEMON);
  3867. +#endif
  3868.  
  3869.    charset_initialise();
  3870.  
  3871. diff -u -r --new-file last-version/source/nmblookup.c samba-1.9.15p4/source/nmblookup.c
  3872. --- last-version/source/nmblookup.c    Wed Nov 22 18:33:01 1995
  3873. +++ samba-1.9.15p4/source/nmblookup.c    Thu Nov 23 11:14:01 1995
  3874. @@ -20,6 +20,10 @@
  3875.     
  3876.  */
  3877.  
  3878. +#ifdef SYSLOG
  3879. +#undef SYSLOG
  3880. +#endif
  3881. +
  3882.  #include "includes.h"
  3883.  #include "nameserv.h"
  3884.  
  3885. @@ -121,6 +125,10 @@
  3886.  
  3887.    TimeInit();
  3888.    charset_initialise();
  3889. +
  3890. +#ifdef SYSLOG
  3891. +  openlog(argv[0], LOG_PID, LOG_DAEMON);
  3892. +#endif
  3893.  
  3894.    dbf = stdout;
  3895.  
  3896. diff -u -r --new-file last-version/source/password.c samba-1.9.15p4/source/password.c
  3897. --- last-version/source/password.c    Wed Nov 22 14:57:44 1995
  3898. +++ samba-1.9.15p4/source/password.c    Fri Nov 24 23:19:53 1995
  3899. @@ -579,6 +579,8 @@
  3900.    BOOL challenge_done = False;
  3901.  #endif
  3902.  
  3903. +  if (password) password[pwlen] = 0;
  3904. +
  3905.  #ifdef SMB_PASSWD
  3906.    if (pwlen == 24)
  3907.      challenge_done = last_challenge(challenge);
  3908. diff -u -r --new-file last-version/source/pcap.c samba-1.9.15p4/source/pcap.c
  3909. --- last-version/source/pcap.c    Wed Jul  5 16:11:41 1995
  3910. +++ samba-1.9.15p4/source/pcap.c    Fri Nov 24 11:59:49 1995
  3911. @@ -117,12 +117,13 @@
  3912.               if ((p=strchr(line,':')))
  3913.               {
  3914.                   *p = '\0';
  3915. -                 if (strlen(p) <= 8)
  3916. -                {
  3917. -                    strcpy(name,p);
  3918. -                     iEtat = 1;
  3919. -                     continue;
  3920. -                 }
  3921. +                p = strtok(line,':');
  3922. +                if (strcmp(p,"bsh")!=0)
  3923. +                  {
  3924. +                    strcpy(name,p);
  3925. +                    iEtat = 1;
  3926. +                    continue;
  3927. +                  }
  3928.               }
  3929.               break;
  3930.              case 1: /* scanning device stanza */
  3931. diff -u -r --new-file last-version/source/server.c samba-1.9.15p4/source/server.c
  3932. --- last-version/source/server.c    Wed Nov 22 21:50:33 1995
  3933. +++ samba-1.9.15p4/source/server.c    Thu Nov 23 11:03:36 1995
  3934. @@ -4008,6 +4008,10 @@
  3935.  
  3936.    charset_initialise();
  3937.  
  3938. +#ifdef SYSLOG
  3939. +  openlog(argv[0], LOG_PID, LOG_DAEMON);
  3940. +#endif
  3941. +
  3942.    /* make absolutely sure we run as root - to handle cases whre people
  3943.       are crazy enough to have it setuid */
  3944.  #ifdef USE_SETRES
  3945. diff -u -r --new-file last-version/source/smb.h samba-1.9.15p4/source/smb.h
  3946. --- last-version/source/smb.h    Wed Nov 22 14:58:18 1995
  3947. +++ samba-1.9.15p4/source/smb.h    Thu Nov 23 11:03:36 1995
  3948. @@ -83,7 +83,14 @@
  3949.  #endif
  3950.  
  3951.  /* debugging code */
  3952. +#ifndef SYSLOG
  3953.  #define DEBUG(level,body) ((DEBUGLEVEL>=(level))?(Debug1 body):0)
  3954. +#else
  3955. +EXTERN int syslog_level;
  3956. +
  3957. +#define DEBUG(level,body) ((DEBUGLEVEL>=(level))? \
  3958. +                           (syslog_level = (level), Debug1 body):0)
  3959. +#endif
  3960.  
  3961.  #define DIR_STRUCT_SIZE 43
  3962.  
  3963. @@ -658,7 +665,7 @@
  3964.  void string_replace(char *s,char old,char new);
  3965.  BOOL user_in_list(char *user,char *list);
  3966.  BOOL string_sub(char *s,char *pattern,char *insert);
  3967. -char *StrnCpy(char *dest,char *src,int n);
  3968. +char *StrnCpy(char *dest,const char *src,int n);
  3969.  char *validated_username(int vuid);
  3970.  BOOL set_user_password(char *user,char *oldpass,char *newpass);
  3971.  int smb_buf_ofs(char *buf);
  3972. diff -u -r --new-file last-version/source/smbpasswd.c samba-1.9.15p4/source/smbpasswd.c
  3973. --- last-version/source/smbpasswd.c    Sat Nov 11 10:56:17 1995
  3974. +++ samba-1.9.15p4/source/smbpasswd.c    Thu Nov 23 11:03:37 1995
  3975. @@ -235,6 +235,10 @@
  3976.  
  3977.      charset_initialise();
  3978.  
  3979. +#ifdef SYSLOG
  3980. +  openlog(argv[0], LOG_PID, LOG_DAEMON);
  3981. +#endif
  3982. +
  3983.  #ifndef DEBUG_PASSWORD
  3984.      /* Check the effective uid */
  3985.      if (geteuid() != 0) {
  3986. diff -u -r --new-file last-version/source/status.c samba-1.9.15p4/source/status.c
  3987. --- last-version/source/status.c    Fri Nov 17 08:33:15 1995
  3988. +++ samba-1.9.15p4/source/status.c    Thu Nov 23 11:14:41 1995
  3989. @@ -23,6 +23,10 @@
  3990.   * This program reports current SMB connections
  3991.   */
  3992.  
  3993. +#ifdef SYSLOG
  3994. +#undef SYSLOG
  3995. +#endif
  3996. +
  3997.  #include "includes.h"
  3998.  #include "loadparm.h"
  3999.  
  4000. diff -u -r --new-file last-version/source/testparm.c samba-1.9.15p4/source/testparm.c
  4001. --- last-version/source/testparm.c    Sun Nov 12 13:09:09 1995
  4002. +++ samba-1.9.15p4/source/testparm.c    Thu Nov 23 11:03:37 1995
  4003. @@ -48,6 +48,10 @@
  4004.  
  4005.    charset_initialise();
  4006.  
  4007. +#ifdef SYSLOG
  4008. +  openlog(argv[0], LOG_PID, LOG_DAEMON);
  4009. +#endif
  4010. +
  4011.    if (argc < 2)
  4012.      strcpy(configfile,CONFIGFILE);
  4013.    else
  4014. diff -u -r --new-file last-version/source/testprns.c samba-1.9.15p4/source/testprns.c
  4015. --- last-version/source/testprns.c    Thu Jun 29 18:15:56 1995
  4016. +++ samba-1.9.15p4/source/testprns.c    Thu Nov 23 11:03:37 1995
  4017. @@ -45,6 +45,10 @@
  4018.  
  4019.     charset_initialise();
  4020.  
  4021. +#ifdef SYSLOG
  4022. +  openlog(argv[0], LOG_PID, LOG_DAEMON);
  4023. +#endif
  4024. +
  4025.     if (argc < 2 || argc > 3)
  4026.        printf("Usage: testprns printername [printcapfile]\n");
  4027.     else
  4028. diff -u -r --new-file last-version/source/trans2.c samba-1.9.15p4/source/trans2.c
  4029. --- last-version/source/trans2.c    Wed Nov 22 21:52:27 1995
  4030. +++ samba-1.9.15p4/source/trans2.c    Fri Nov 24 14:46:43 1995
  4031. @@ -264,6 +264,7 @@
  4032.    BOOL isrootdir = (strequal(Connections[cnum].dirpath,"./") ||
  4033.              strequal(Connections[cnum].dirpath,".") ||
  4034.              strequal(Connections[cnum].dirpath,"/"));
  4035. +  BOOL was_8_3;
  4036.  
  4037.    *fname = 0;
  4038.    *out_of_space = False;
  4039. @@ -346,19 +347,7 @@
  4040.    p = pdata;
  4041.    name_ptr = p;
  4042.  
  4043. -#ifdef MANGLE_LONG_FILENAMES
  4044. -  {
  4045. -    BOOL illegal = False;
  4046. -    int i;
  4047. -    int l = strlen(fname);
  4048. -    for (i=0;i<l;i++) 
  4049. -      if (strchr("*\\/?<>|\":{}",fname[i])) {
  4050. -    illegal = True;
  4051. -    break;
  4052. -      }
  4053. -    name_map_mangle(fname,illegal,SNUM(cnum));
  4054. -  }
  4055. -#endif
  4056. +  name_map_mangle(fname,False,SNUM(cnum));
  4057.  
  4058.    switch (info_level)
  4059.      {
  4060. @@ -432,6 +421,7 @@
  4061.        break;
  4062.  
  4063.      case SMB_FIND_FILE_BOTH_DIRECTORY_INFO:
  4064. +      was_8_3 = is_8_3(fname);
  4065.        SIVAL(p,0,94+strlen(fname)); p += 4;
  4066.        SIVAL(p,0,reskey); p += 4;
  4067.        put_long_date(p,cdate); p += 8;
  4068. @@ -443,8 +433,12 @@
  4069.        SIVAL(p,0,mode); p += 4;
  4070.        SIVAL(p,0,strlen(fname)); p += 4;
  4071.        SIVAL(p,0,0); p += 4;
  4072. -      if (!is_8_3(fname)) {
  4073. +      if (!was_8_3) {
  4074. +#ifndef KANJI
  4075.      strcpy(p+2,unix2dos_format(fname,False));
  4076. +#else 
  4077. +    strcpy(p+2,fname);
  4078. +#endif
  4079.      name_map_mangle(p+2,True,SNUM(cnum));
  4080.        } else
  4081.      *(p+2) = 0;
  4082. diff -u -r --new-file last-version/source/util.c samba-1.9.15p4/source/util.c
  4083. --- last-version/source/util.c    Wed Nov 22 17:14:00 1995
  4084. +++ samba-1.9.15p4/source/util.c    Thu Nov 23 11:19:04 1995
  4085. @@ -20,6 +20,7 @@
  4086.  */
  4087.  
  4088.  #include "includes.h"
  4089. +#include "loadparm.h"
  4090.  
  4091.  pstring scope = "";
  4092.  
  4093. @@ -69,6 +70,7 @@
  4094.  int ReadSize = 16*1024;
  4095.  
  4096.  pstring debugf = "/tmp/log.samba";
  4097. +int syslog_level;
  4098.  
  4099.  /* the following control case operations - they are put here so the
  4100.     client can link easily */
  4101. @@ -103,16 +105,20 @@
  4102.    char *format_str;
  4103.  #endif
  4104.    va_list ap;
  4105. -  
  4106. -  if (!dbf) 
  4107. -    {
  4108. -          dbf = fopen(debugf,"w");
  4109. -    if (dbf)
  4110. -      setbuf(dbf,NULL);
  4111. -    else
  4112. -      return(0);
  4113. -    }
  4114.  
  4115. +#ifdef SYSLOG
  4116. +  if (!lp_syslog_only())
  4117. +#endif  
  4118. +  {
  4119. +    if (!dbf) 
  4120. +      {
  4121. +            dbf = fopen(debugf,"w");
  4122. +      if (dbf)
  4123. +        setbuf(dbf,NULL);
  4124. +      else
  4125. +        return(0);
  4126. +      }
  4127. +  }
  4128.    
  4129.  #ifdef __STDC__
  4130.    va_start(ap, format_str);
  4131. @@ -121,9 +127,41 @@
  4132.    format_str = va_arg(ap,char *);
  4133.  #endif
  4134.  
  4135. -  vfprintf(dbf,format_str,ap);
  4136. +#ifdef SYSLOG
  4137. +  if (syslog_level < lp_syslog())
  4138. +  {
  4139. +    /* 
  4140. +     * map debug levels to syslog() priorities
  4141. +     * note that not all DEBUG(0, ...) calls are
  4142. +     * necessarily errors
  4143. +     */
  4144. +    static int priority_map[] = { 
  4145. +                                  LOG_ERR,     /* 0 */
  4146. +                                  LOG_WARNING, /* 1 */
  4147. +                                  LOG_NOTICE,  /* 2 */
  4148. +                                  LOG_INFO,    /* 3 */
  4149. +                                };
  4150. +    int priority;
  4151. +    pstring msgbuf;
  4152. +
  4153. +    if (syslog_level >= sizeof(priority_map) / sizeof(priority_map[0]) ||
  4154. +        syslog_level < 0)
  4155. +      priority = LOG_DEBUG;
  4156. +    else
  4157. +      priority = priority_map[syslog_level];
  4158. +
  4159. +    vsprintf(msgbuf, format_str, ap);
  4160.  
  4161. -  fflush(dbf);
  4162. +    msgbuf[255] = '\0';
  4163. +    syslog(priority, "%s", msgbuf);
  4164. +  }
  4165. +
  4166. +  if (!lp_syslog_only())
  4167. +#endif
  4168. +  {
  4169. +    vfprintf(dbf,format_str,ap);
  4170. +    fflush(dbf);
  4171. +  }
  4172.  
  4173.    va_end(ap);
  4174.    return(0);
  4175. @@ -698,7 +736,7 @@
  4176.  /****************************************************************************
  4177.  line strncpy but always null terminates. Make sure there is room!
  4178.  ****************************************************************************/
  4179. -char *StrnCpy(char *dest,char *src,int n)
  4180. +char *StrnCpy(char *dest,const char *src,int n)
  4181.  {
  4182.    char *d = dest;
  4183.    if (!dest) return(NULL);
  4184. @@ -3011,7 +3049,7 @@
  4185.          return;
  4186.        }
  4187.    
  4188. -  /* Get a list of the configures interfaces */
  4189. +  /* Get a list of the configured interfaces */
  4190.  #ifdef USE_IFREQ
  4191.    ifc = (struct ifconf *)buff;
  4192.    ifc->ifc_len = BUFSIZ - sizeof(struct ifconf);
  4193. @@ -3032,7 +3070,7 @@
  4194.        }
  4195.      }
  4196.    }
  4197. -#elif defined(__FreeBSD__)
  4198. +#elif defined(__FreeBSD__) || defined(NETBSD)
  4199.    ifc.ifc_len = sizeof(buff);
  4200.    ifc.ifc_buf = buff;
  4201.    if (ioctl(sock, SIOCGIFCONF, &ifc) < 0) {
  4202. @@ -3543,7 +3581,7 @@
  4203.    
  4204.    bzero((char *)&sock,sizeof(sock));
  4205.    memcpy((char *)&sock.sin_addr,(char *)hp->h_addr, hp->h_length);
  4206. -#ifdef __FreeBSD__        /* XXX not the right ifdef */
  4207. +#if defined(__FreeBSD__) || defined(NETBSD) /* XXX not the right ifdef */
  4208.    sock.sin_len = sizeof(sock);
  4209.  #endif
  4210.    sock.sin_port = htons( port );
  4211. @@ -4263,6 +4301,30 @@
  4212.    return unlink (zfrom);
  4213.  }
  4214.  #endif
  4215. +
  4216. +
  4217. +#ifdef REPLACE_INNETGR
  4218. +/*
  4219. + * Search for a match in a netgroup. This replaces it on broken systems.
  4220. + */
  4221. +int InNetGr(group, host, user, dom)
  4222. +        char *group, *host, *user, *dom;
  4223. +{
  4224. +  char *hst, *usr, *dm;
  4225. +  
  4226. +  setnetgrent(group);
  4227. +  while (getnetgrent(&hst, &usr, &dm))
  4228. +    if (((host == 0) || (hst == 0) || !strcmp(host, hst)) &&
  4229. +    ((user == 0) || (usr == 0) || !strcmp(user, usr)) &&
  4230. +    ((dom == 0) || (dm == 0) || !strcmp(dom, dm))) {
  4231. +      endnetgrent();
  4232. +      return (1);
  4233. +    }
  4234. +  endnetgrent();
  4235. +  return (0);
  4236. +}
  4237. +#endif
  4238. +
  4239.  
  4240.  #if WRAP_MEMCPY
  4241.  #undef memcpy
  4242. diff -u -r --new-file last-version/source/version.h samba-1.9.15p4/source/version.h
  4243. --- last-version/source/version.h    Wed Nov 22 22:10:03 1995
  4244. +++ samba-1.9.15p4/source/version.h    Fri Nov 24 23:20:42 1995
  4245. @@ -1 +1 @@
  4246. -#define VERSION "1.9.15p3"
  4247. +#define VERSION "1.9.15p4"
  4248.